VSRepo

repository·master·Indexed 41 days ago

https://github.com/vapoursynth/vsrepo

A stateless package repository and command-line tool for managing VapourSynth plugins and scripts. It handles the installation of VSPlugin, PyWheel, and PyScript packages into plugin autoload directories and Python site-packages, providing operations to install, upgrade, and uninstall packages.

Tokens
1.4K
Snippets
5
Records
7
Agent score
50%

What's inside VSRepo

  1. Install and manage VapourSynth packages with vsrepo

    master

    VSRepo is a stateless package repository for VapourSynth used to install plugins and scripts. By default, packages are installed to the per-user plugin autoload directory and the per-user Python site-packages directory.

    Key Installation Behaviors:

    • Portable Installs: Use the -p switch if you are using a portable installation of VapourSynth.
    • Platform Targeting: By default, binaries matching the current platform's Python are installed. You can override this using -t win32 or -t win64.
    vsrepo install <package_name>
  2. Update package definitions with VSRUpdate.py

    master

    VSRUpdate.py is a utility intended for maintainers or users who want to update or add new packages to the repository. It provides two primary commands:

    1. update-local: Queries the GitHub API to automatically add new releases.
    2. compile: Combines individual package files into a single distributable file.

    Note that update-local requires a GitHub token when using the -g flag.

    # Query GitHub API to add new releases locally
    vsrupdate update-local -o -g <github token>
    
    # Combine package files into one distributable file
    vsrupdate compile
  3. How vsrepo manages package types

    master

    VSRepo handles three distinct types of packages, each with a different installation destination:

    1. VSPlugin: Compiled VapourSynth plugins. These are installed into the VapourSynth plugin directory (retrieved via vapoursynth.get_plugin_dir()).
    2. PyWheel: Python wheels. These are installed into the Python site-packages directory.
    3. PyScript: Python scripts. These are installed into the Python site-packages directory.

    When installing PyWheel or PyScript packages, vsrepo creates .dist-info directories to allow for proper version detection and uninstallation, similar to standard Python package managers.

  4. Use the vsrepo CLI to manage VapourSynth packages

    master

    VSRepo is a package manager for VapourSynth plugins and Python scripts. It provides a command-line interface to install, upgrade, update, and uninstall packages.

    Note: If a package is marked as being available via PyPI, vsrepo will instruct you to use pip instead.

    # Examples of common operations
    vsrepo install <package_id>
    vsrepo upgrade <package_id>
    vsrepo upgrade-all
    vsrepo uninstall <package_id>
    vsrepo installed
    vsrepo available
    vsrepo update
  5. Use vsrepo CLI commands

    master

    The vsrepo command-line tool provides several operations for managing VapourSynth packages. When installing, the tool searches for matches using the following priority order: Identifier > namespace > modulename > name.

    # Install specific plugins or scripts
    vsrepo install havsfunc ffms2 d2v
    
    # Update all installed packages to the latest version
    vsrepo upgrade-all
    
    # Fetch the latest package definitions from the repository
    vsrepo update
    
    # List all currently installed packages
    vsrepo installed
    
    # List all known packages available in the repository
    vsrepo available
    
    # Remove all files related to a specific package
    # WARNING: Dependencies are not considered; uninstalling a plugin may break scripts.
    vsrepo uninstall nnedi3
  6. Reference the vsrepo CLI commands and flags

    master

    The vsrepo command accepts an operation followed by optional package identifiers and flags.

    Operations:

    • install: Install one or more packages.
    • update: Update the local package definitions (download vspackages3.json).
    • upgrade: Upgrade specific packages to the latest version.
    • upgrade-all: Upgrade all installed packages to their latest versions.
    • uninstall: Remove installed packages.
    • installed: List all currently installed packages.
    • available: List all packages available in the repository.
    • paths: Display the paths used for definitions, binaries, and scripts.
    • genstubs: Update VapourSynth stubs.
    • gendistinfo: Rebuild dist-info directories for Python packages.

    Flags:

    • -f, --force: Force an upgrade for packages where the current version is unknown.
    • -d, --skip_deps: Skip installing dependencies for the specified package.
    • -t, --target: Specify the target architecture for binaries (e.g., win64, linux-glibc-x86_64, darwin-aarch64). Defaults to the current Python architecture.
  7. View vsrepo configuration and installation paths

    master

    Use the paths command to see where vsrepo is looking for its data and where it installs files.

    Output includes:

    • Definitions: The path to the local vspackages3.json file.
    • Binaries: The directory where VSPlugin types are installed.
    • Scripts: The directory where PyScript and PyWheel types are installed.
    • Dist-Infos: The Python site-packages directory (if applicable).
    vsrepo paths