Skip to content

Creating a Package

Eric Apgar edited this page Feb 13, 2026 · 6 revisions

How to create a repo that can be built as a package and installed by other projects into virtual environments.

ChatGPT

1. Release Tag

uv add "https://github.com/you/media-tools.git" --tag v0.1.0

What uv does:

  • It treats the Git repo as the source.

  • When someone runs uv sync in new-repo, uv will:

    • Download/clone media-tools from GitHub (internally, into its cache).
    • Check out tag v0.1.0.
    • Build/install media-tools from that source code.

From new-repo’s point of view:

  • Dependency recorded as:

    “I depend on media-tools, which lives at this Git URL, at tag v0.1.0.”

  • Every user needs git + build tools, because their machine builds media-tools from source each time.

Think: “Pull the whole project and build it for me.”

2. Wheel File

uv add "https://github.com/you/media-tools/releases/download/v0.1.0/media_tools-0.1.0-py3-none-any.whl"

What uv does:

  • It treats the wheel file as the source.

  • When someone runs uv sync in new-repo, uv will:

    • Download that single .whl file.
    • Install it directly (no build step).

From new-repo’s point of view:

  • Dependency recorded as:

    “I depend on media-tools, and you can get the exact built wheel from this URL.”

  • Users do not need git or build tooling; they just download and install the ready-made package.

Think: “Just grab this finished binary package and install it.”


So which one matches what you want?

You said you don’t want or need the full repo for consumers of new-repo.

So for new-repo’s dependency on media-tools, you probably want:

uv add "https://github.com/you/media-tools/releases/download/v0.1.0/media_tools-0.1.0-py3-none-any.whl"

That way, from new-repo’s standpoint:

  • It depends on a single, tested artifact.
  • Installs are lighter and simpler for whoever uses new-repo.

Clone this wiki locally