uv/crates/uv-python
samypr100 e730ef19f1
Patch additional sysconfig values such as clang at install time (#9916)
## Summary

Minor follow up to https://github.com/astral-sh/uv/pull/9905 to patch
`clang` with `cc`.

Implements the replacements used in
[sysconfigpatcher](https://github.com/bluss/sysconfigpatcher/blob/main/src/sysconfigpatcher.py#L54),
namely

```python
DEFAULT_VARIABLE_UPDATES = {
    "CC": WordReplace("clang", "cc"),
    "CXX": WordReplace("clang++", "c++"),
    "BLDSHARED": WordReplace("clang", "cc"),
    "LDSHARED": WordReplace("clang", "cc"),
    "LDCXXSHARED": WordReplace("clang++", "c++"),
    "LINKCC": WordReplace("clang", "cc"),
    "AR": "ar",
}
```

## Test Plan

Added an additional test. Tested local python installs.

Related traces
```
TRACE Updated `AR` from `/tools/clang-linux64/bin/llvm-ar` to `ar`
TRACE Updated `CC` from `clang -pthread` to `cc -pthread`
TRACE Updated `CXX` from `clang++ -pthread` to `c++ -pthread`
TRACE Updated `BLDSHARED` from `clang -pthread -shared -L/tools/deps/lib` to `cc -pthread -shared -L/tools/deps/lib`
TRACE Updated `LDSHARED` from `clang -pthread -shared -L/tools/deps/lib` to `cc -pthread -shared -L/tools/deps/lib`
TRACE Updated `LDCXXSHARED` from `clang++ -pthread -shared` to `c++ -pthread -shared`
TRACE Updated `LINKCC` from `clang -pthread` to `cc -pthread
```

## Pending Discussion Items

https://github.com/astral-sh/uv/pull/9905#issuecomment-2543879587
2024-12-17 15:09:45 -05:00
..
python Support 32-bit OS on 64-bit host (#9970) 2024-12-17 14:35:19 +01:00
src Patch additional sysconfig values such as clang at install time (#9916) 2024-12-17 15:09:45 -05:00
Cargo.toml Patch sysconfig data at install time (#9857) 2024-12-13 14:36:22 -05:00
download-metadata.json Allow download of Python distribution variants with newer CPU instruction sets (#9781) 2024-12-10 14:26:45 -06:00
fetch-download-metadata.py Allow download of Python distribution variants with newer CPU instruction sets (#9781) 2024-12-10 14:26:45 -06:00
template-download-metadata.py Update Rust crate target-lexicon to 0.13.0 (#9729) 2024-12-10 20:34:07 -05:00