Fix Makefile TARGET detection for container builds #2

Closed
mik-tf wants to merge 0 commits from development_fix_makefile_target into development
Owner

Fix make install failing in container environments where CARGO_TARGET_DIR is set but python3 may not be available.

Changes

  • Use CARGO_TARGET_DIR directly when set, falling back to cargo metadata + python3 detection, then target/

Testing

  • make install succeeds locally
  • CARGO_TARGET_DIR=/tmp/test make -n install resolves correctly

Related: lhumina_code/hero_services#29

Fix `make install` failing in container environments where `CARGO_TARGET_DIR` is set but `python3` may not be available. ## Changes - Use `CARGO_TARGET_DIR` directly when set, falling back to `cargo metadata` + `python3` detection, then `target/` ## Testing - `make install` succeeds locally - `CARGO_TARGET_DIR=/tmp/test make -n install` resolves correctly Related: lhumina_code/hero_services#29
When CARGO_TARGET_DIR is set (e.g. in container builds), use it
directly instead of relying on python3 + cargo metadata fallback.
Fixes make install failing in environments without python3.

Co-Authored-By: mik-tf <mik@threefold.io>
mik-tf changed title from WIP: Fix Makefile TARGET detection for container builds to Fix Makefile TARGET detection for container builds 2026-02-26 14:34:41 +00:00
Author
Owner

@timur

Lmk what you think! We can review + merge, and also cherry pick and close the PR too.

@timur Lmk what you think! We can review + merge, and also cherry pick and close the PR too.
mik-tf requested review from timur 2026-02-26 16:34:07 +00:00
Aligns with hero_ecosystem skill requirement: all repos must use
edition = "2024" and rust-version = "1.92".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Take development's standardized Makefile header.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chore: bump rust-version to 1.93 per hero_ecosystem standard
Some checks failed
Build & Test / check (pull_request) Failing after 1s
60f2c2ec27
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mik-tf closed this pull request 2026-03-05 00:21:20 +00:00
Some checks failed
Build & Test / check (pull_request) Failing after 1s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_inspector!2
No description provided.