-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a Package
How to create a repo that can be built as a package and installed by other projects into virtual environments.
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 syncinnew-repo, uv will:- Download/clone
media-toolsfrom GitHub (internally, into its cache). - Check out tag
v0.1.0. - Build/install
media-toolsfrom that source code.
- Download/clone
From new-repo’s point of view:
-
Dependency recorded as:
“I depend on
media-tools, which lives at this Git URL, at tagv0.1.0.” -
Every user needs git + build tools, because their machine builds
media-toolsfrom source each time.
Think: “Pull the whole project and build it for me.”
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 syncinnew-repo, uv will:- Download that single
.whlfile. - Install it directly (no build step).
- Download that single
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.”
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.