Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,23 @@ the smallest complete one.
- With hatchling, use `only-include` + `sources`, **not** `packages`:

```toml
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/<name>"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
```

`packages` keeps only the last path component, so it builds without complaint
and produces a wheel rooted at a bare top-level `<name>/`.
and produces a wheel rooted at a bare top-level `<name>/`. `only-include`
goes in `[tool.hatch.build]` so the sdist gets it too. Without it the sdist
takes the whole example directory: tracked media, stray `.mcap` recordings
and, in an example with its own `.gitignore` (hatchling reads only the
nearest one), `uv.lock` and build trees. Files the code reads from the
example root, such as teleop_ros2's `configs/`, are therefore not in the
sdist: run such an example from the source tree or the install tree.
`sources` stays on the wheel: the sdist must keep the `python/` prefix that
the wheel build looks for.
- Keep `[tool.uv.sources]` last in the file. `install_python_example()` strips
it from the installed copy by matching up to the next `[`, so a block after it
loses its comments.
Expand Down
6 changes: 4 additions & 2 deletions examples/camera_viz/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ viewer = ["isaaccapture[cloudxr]", "pillow>=10.0"]
# The native codec's .so is built in place by codec/build.sh, so it is picked up
# from the source tree rather than shipped by this build. Hatchling reads only
# this directory's .gitignore, so the codec build tree is excluded here.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/camera_viz"]
sources = ["python"]
exclude = [
"/python/isaaccapture_examples/camera_viz/codec/build",
"/python/isaaccapture_examples/camera_viz/argus/build",
"*.so",
]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv]
python-preference = "only-managed"
4 changes: 3 additions & 1 deletion examples/cloudxr_mujoco_teleop/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ dependencies = [
#
# vive_assets/ lives inside the package because the modules resolve it from
# __file__, so the meshes must travel with them.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/cloudxr_mujoco_teleop"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/deviceio_live_view/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# deviceio_live_view -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/deviceio_live_view"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/haptic_feedback/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# haptic_feedback -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/haptic_feedback"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/mcap_record_replay/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ dependencies = [
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
# the latter keeps only the last path component and would root the wheel at a
# bare top-level `mcap_record_replay/`.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/mcap_record_replay"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/noitom/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# noitom -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/noitom"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/oglo_tactile/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# oglo_tactile -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/oglo_tactile"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/oxr/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# oxr -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/oxr"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/retargeting/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies = [
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
# the latter keeps only the last path component and would root the wheel at a
# bare top-level `retargeting/`.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/retargeting"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/sharpa_avatar/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# sharpa_avatar -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/sharpa_avatar"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/soma_body_publisher/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ dependencies = [
"py-soma-x==0.3.1",
]

[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/soma_body_publisher"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/soma_hand_publisher/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ dependencies = [
"py-soma-x==0.3.1",
]

[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/soma_hand_publisher"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/tactile/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ dependencies = [
"numpy>=1.23.0",
]

[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/tactile"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[tool.uv.sources]
Expand Down
4 changes: 3 additions & 1 deletion examples/teleop/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ ui = ["isaaccapture[ui]"]
#
# config/ lives inside the package because the bimanual examples resolve it
# from __file__, so the YAML and URDF must travel with them.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/teleop"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/teleop_ros2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ testpaths = ["../../tests/python/examples/teleop_ros2"]
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
# the latter keeps only the last path component and would root the wheel at a
# bare top-level `teleop_ros2/`.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
Comment thread
ivany-nv marked this conversation as resolved.
Resolved
only-include = ["python/isaaccapture_examples/teleop_ros2"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/teleop_session_manager/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies = [
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
# the latter keeps only the last path component and would root the wheel at a
# bare top-level `teleop_session_manager/`.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/teleop_session_manager"]

[tool.hatch.build.targets.wheel]
sources = ["python"]
4 changes: 3 additions & 1 deletion examples/vehicle_teleop/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ dependencies = [

# `only-include` + `sources`, not `packages`, and no __init__.py above
# vehicle_teleop -- see the packaging rules in examples/README.md.
[tool.hatch.build.targets.wheel]
[tool.hatch.build]
only-include = ["python/isaaccapture_examples/vehicle_teleop"]

[tool.hatch.build.targets.wheel]
sources = ["python"]

[[tool.uv.index]]
Expand Down
Loading