Commit 360522d
authored
[Wheel] Support self-contained package and Git-source installs (#7438)
# Description
Make the aggregate Isaac Lab package self-contained and directly
installable from a Git revision.
The wheel previously exposed the canonical core package through a nested
`isaaclab/source/isaaclab/isaaclab` tree and a runtime
`isaaclab.__path__` mutation. In addition, downstream projects could not
use the repository as a normal Git dependency: pointing a package
manager at `source/isaaclab` built only the dependency-free leaf package
and omitted repository-level runtime resources such as
`apps/isaaclab.python.kit`.
This PR:
- installs the canonical core modules directly in the top-level
`isaaclab` package;
- resolves bundled resources consistently in source checkouts and
installed packages;
- exposes `tools/wheel_builder` as a PEP 517 package source;
- stages Git-source builds through the same aggregate package assembly
used by release wheels;
- preserves the aggregate wheel’s top-level `main()` and
`bootstrap_kernel()` compatibility APIs;
- routes the installed console command through the compatibility
dispatcher, including `--generate-vscode-settings`;
- retains the root `pyproject.toml` as the single source of truth for
third-party dependencies and extras;
- bundles the sibling `isaaclab_*` packages, Kit experience files,
package data, and template resources; and
- keeps the existing `tools/wheel_builder/build.sh` workflow by sharing
its staging implementation.
No dependencies are added to the individual Isaac Lab subpackage
manifests, and no public Python API is changed.
## Downstream use cases
External task repositories and applications can now depend on one
aggregate `isaaclab` package at an unreleased commit or tag. They no
longer need:
- a sibling Isaac Lab checkout at a fixed local path;
- separate source declarations for every `isaaclab_*` package;
- a copied list of Isaac Lab's transitive third-party dependencies; or
- a downstream workaround for the missing `apps/isaaclab.python.kit`
resource.
A downstream uv project can declare:
```toml
[project]
dependencies = ["isaaclab"]
[tool.uv.sources]
isaaclab = {
git = "https://github.com/isaac-sim/IsaacLab.git",
rev = "<commit-or-tag>",
subdirectory = "tools/wheel_builder",
}
```
Pinning `rev` to a commit or tag makes the complete Isaac Lab code and
dependency metadata reproducible in the downstream lockfile. A branch
such as `develop` also works, with the usual behavior that a future
lockfile update may select a newer revision.
This is particularly useful for downstream task packages that need
changes from `develop` before the next Isaac Lab wheel release, and for
CI systems that should resolve the complete environment without
provisioning a separate source checkout.
## Implementation
- The aggregate wheel uses a conventional flat `isaaclab` package
instead of extending `isaaclab.__path__` at runtime. The resource
resolver lives in the conventionally named `isaaclab.paths` module.
- The compatibility dispatcher now lives in the canonical package, so
source and aggregate builds share `isaaclab.__main__`; the generated
console entry point targets that dispatcher rather than bypassing legacy
options.
- A small PEP 517 backend implements wheel, sdist, and metadata hooks
for Git-source consumers.
- Package staging was moved from shell commands into a shared Python
helper used by both the PEP 517 backend and the existing build script.
- The generated aggregate metadata continues to read dependencies and
extras from the repository root and removes only the `isaaclab_*`
workspace self-references because those packages are bundled in the
artifact.
- The installed package includes `apps/*.kit`, so asset-root discovery
and `AppLauncher` use the same experience files as a source checkout.
## Type of change
- Bug fix (non-breaking change which fixes the installed package layout)
- New feature (Git-source installation for downstream projects)
## Release backport
- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`
## Validation
- Resolved and installed a fresh uv project whose only dependency was
`isaaclab` from a pinned Git revision and the `tools/wheel_builder`
subdirectory.
- Verified imports for `isaaclab`, `isaaclab_assets`, `isaaclab_newton`,
`isaaclab_rl`, and `isaaclab_tasks` from that fresh environment.
- Verified the Git-built installation contains
`apps/isaaclab.python.kit`, resolves the default asset root, and runs
`isaaclab --help`.
- Built both a wheel and an sdist through the new PEP 517 entry point.
- Built the wheel through the existing `tools/wheel_builder/build.sh`
entry point.
- Ran focused CLI, wheel-metadata, and asset tests (77 passed),
including regressions for the legacy VS Code option and top-level
compatibility APIs.
- Inspected the wheel to verify that core modules use the flat layout,
`isaaclab/paths.py` replaces `_paths.py`, the console entry point
targets `isaaclab.__main__:main`, and the Kit experience files are
included.
- Ruff, formatting, and all applicable pre-commit hooks passed. The
repository-wide changelog hook reports pre-existing fragment differences
on the branch; this PR includes the required `isaaclab` changelog
fragments.
## Screenshots
Not applicable.
## Checklist
- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the applicable pre-commit checks
- [x] I have documented the Git-source installation path
- [x] My changes generate no new runtime warnings
- [x] I have added tests that exercise the aggregate build and installed
resource layout
- [x] I have added a changelog fragment under
`source/isaaclab/changelog.d/`
- [x] My name already exists in `CONTRIBUTORS.md`1 parent 9be9102 commit 360522d
20 files changed
Lines changed: 332 additions & 216 deletions
File tree
- docs/source/setup/installation
- source/isaaclab
- changelog.d
- isaaclab
- app
- benchmark
- recorders
- cli
- utils
- test
- cli
- install_ci/misc
- tools/wheel_builder
- res
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
571 | 589 | | |
572 | 590 | | |
573 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
118 | | - | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
1180 | 1181 | | |
1181 | 1182 | | |
1182 | 1183 | | |
1183 | | - | |
| 1184 | + | |
1184 | 1185 | | |
1185 | 1186 | | |
1186 | 1187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | | - | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments