Skip to content

Commit acf423a

Browse files
authored
Enhance UNIDEP_SKIP_LOCAL_DEPS documentation with context and rationale (#250)
1 parent 336e8eb commit acf423a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,9 @@ dependencies = [
396396

397397
#### `UNIDEP_SKIP_LOCAL_DEPS`
398398

399-
When building wheels for distribution (e.g., for PyPI), you may want to exclude local dependencies to avoid hardcoded file paths in the wheel metadata. Set this environment variable to skip including local dependencies as `file://` URLs:
399+
Local dependencies are useful for monorepos, shared configuration files, and local development workflows where you're developing multiple related packages. However, when building wheels for distribution (e.g., for PyPI), including local dependencies creates hardcoded `file://` paths in the wheel metadata, making wheels non-portable.
400+
401+
Set this environment variable to skip including local dependencies as `file://` URLs when building distributable artifacts:
400402

401403
```bash
402404
# For hatch projects
@@ -411,6 +413,8 @@ UNIDEP_SKIP_LOCAL_DEPS=1 python -m build
411413

412414
> [!NOTE]
413415
> When this variable is set, local dependencies are skipped but their actual dependencies (extracted from `requirements.yaml` or `pyproject.toml`) are still included in the built wheel. This ensures the wheel remains functional while avoiding non-portable absolute paths.
416+
>
417+
> **Two contexts, same codebase**: Local dependencies are included by default (great for `unidep install` during development), but this environment variable provides the context switch needed when building for distribution.
414418
415419
### Example packages
416420

0 commit comments

Comments
 (0)