You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a new package with say uv init --package, add a dependency, say the progress package, with uv add progress. My pyprojects.toml looks like this:
Company policy is to ensure that we don't use source distributions (only prebuilt binary wheel dependencies) which we used to do with pip install -r requirements.txt --no-compile. We are now trying to switch over to uv, but uv sync --no-build returns error: Distribution hatch-demo==0.1.0 @ editable+.can't be installed because it is marked as--no-build but has no binary distribution
Although I can see why this returns an error, the purpose of --no-build for us should be to not build dependencies when building our package, not to inhibit us from building the package itself. We could technically do uv sync --no-build-package pkg1 --no-build-package pkg2 ... --no-build-package pkgN for all dependencies, but that doesn't seem like a very elegant solution.
Not sure if a fix for this problem aligns with the goals of uv.
TLDR: I want to 1) uv sync dependencies with --no-build and then 2) build the package with said dependencies.
The text was updated successfully, but these errors were encountered:
Thanks for guiding me to the right answer! To avoid running build on packages in my CI environment, I just enter
uv sync --no-build --no-install-project # Fetches prebuilt wheels
uv sync --frozen # builds project with previously synced dependencies
uv run --frozen <MY_PACKAGE># Now CI can perform tests on the package before publishing to internal Python package index
When trying to create a new package with say
uv init --package
, add a dependency, say the progress package, withuv add progress
. My pyprojects.toml looks like this:Company policy is to ensure that we don't use source distributions (only prebuilt binary wheel dependencies) which we used to do with
pip install -r requirements.txt --no-compile
. We are now trying to switch over to uv, butuv sync --no-build
returnserror: Distribution
hatch-demo==0.1.0 @ editable+.can't be installed because it is marked as
--no-buildbut has no binary distribution
Although I can see why this returns an error, the purpose of --no-build for us should be to not build dependencies when building our package, not to inhibit us from building the package itself. We could technically do
uv sync --no-build-package pkg1 --no-build-package pkg2 ... --no-build-package pkgN
for all dependencies, but that doesn't seem like a very elegant solution.Not sure if a fix for this problem aligns with the goals of uv.
TLDR: I want to 1) uv sync dependencies with --no-build and then 2) build the package with said dependencies.
The text was updated successfully, but these errors were encountered: