The prepare_new_source function calls vendor_rust with sdist_root_dir as project root directory:
|
def prepare_new_source( |
|
ctx: context.WorkContext, |
|
req: Requirement, |
|
source_root_dir: pathlib.Path, |
|
version: Version, |
|
) -> None: |
|
"""Default steps for new sources |
|
|
|
- patch sources |
|
- apply project overrides from settings |
|
- vendor Rust dependencies |
|
|
|
:func:`~default_prepare_source` runs this function when the sources are new. |
|
""" |
|
patch_source(ctx, source_root_dir, req, version) |
|
pyproject.apply_project_override( |
|
ctx=ctx, |
|
req=req, |
|
sdist_root_dir=source_root_dir, |
|
) |
|
vendor_rust.vendor_rust(req, source_root_dir) |
This breaks packages that use the build_dir option for an alternative location for pyproject.toml. prepare_new_source should vendor Rust code with pbi.build_dir(sdist_root_dir) instead.
The package primp with build_dir crates/primp-python is affected by the bug, https://github.com/deedy5/primp/tree/v1.1.2/crates/primp-python
The
prepare_new_sourcefunction callsvendor_rustwith sdist_root_dir as project root directory:fromager/src/fromager/sources.py
Lines 566 to 586 in 4667c98
This breaks packages that use the
build_diroption for an alternative location forpyproject.toml.prepare_new_sourceshould vendor Rust code withpbi.build_dir(sdist_root_dir)instead.The package
primpwith build_dircrates/primp-pythonis affected by the bug, https://github.com/deedy5/primp/tree/v1.1.2/crates/primp-python