fix: fix lib artifact path issue
This commit is contained in:
@@ -56,3 +56,4 @@ description = "a brown fox jumps over a lazy dog."
|
|||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
- `OMRF_PACKER_CARGO`: Path to the `cargo` executable used to collect project metadata. When unset, the packer invokes `cargo` as resolved from `PATH`.
|
- `OMRF_PACKER_CARGO`: Path to the `cargo` executable used to collect project metadata. When unset, the packer invokes `cargo` as resolved from `PATH`.
|
||||||
|
- `OMRF_PACKER_RUSTC`: Path to the `rustc` executable used to resolve the host toolchain triple. When unset, the packer invokes `rustc` as resolved from `PATH`.
|
||||||
|
|||||||
@@ -165,7 +165,6 @@ def _generate_lib_artifact_name(name: str, _: Triple) -> str:
|
|||||||
def resolve_lib_copy(ctx: ArtifactContext) -> Iterator[FileCopyInfo]:
|
def resolve_lib_copy(ctx: ArtifactContext) -> Iterator[FileCopyInfo]:
|
||||||
"""Yield :class:`FileCopyInfo` for the built dynamic library (and, on Windows, the import library)."""
|
"""Yield :class:`FileCopyInfo` for the built dynamic library (and, on Windows, the import library)."""
|
||||||
extractor = ctx.extractor
|
extractor = ctx.extractor
|
||||||
target_directory = extractor.get_target_directory() / "release"
|
|
||||||
target_name = extractor.get_target_name()
|
target_name = extractor.get_target_name()
|
||||||
|
|
||||||
# get triple info
|
# get triple info
|
||||||
@@ -173,6 +172,12 @@ def resolve_lib_copy(ctx: ArtifactContext) -> Iterator[FileCopyInfo]:
|
|||||||
if ctx.options.target is not None:
|
if ctx.options.target is not None:
|
||||||
target_triple = ctx.options.target
|
target_triple = ctx.options.target
|
||||||
|
|
||||||
|
# compute target directory
|
||||||
|
target_directory = extractor.get_target_directory()
|
||||||
|
if ctx.options.target is not None:
|
||||||
|
target_directory /= str(ctx.options.target)
|
||||||
|
target_directory /= "release"
|
||||||
|
|
||||||
# copy artifact for redist
|
# copy artifact for redist
|
||||||
dll_artifact_filename = _generate_dll_artifact_name(target_name, target_triple)
|
dll_artifact_filename = _generate_dll_artifact_name(target_name, target_triple)
|
||||||
yield FileCopyInfo(
|
yield FileCopyInfo(
|
||||||
|
|||||||
Reference in New Issue
Block a user