uv
9a92a3ad - Apply advisory locks when building source distributions (#3525)

Comment changes are shownComment changes are hidden
Commit
1 year ago
Apply advisory locks when building source distributions (#3525) ## Summary I don't love this, but it turns out that setuptools is not robust to parallel builds: https://github.com/pypa/setuptools/issues/3119. As a result, if you run uv from multiple processes, and they each attempt to build the same source distribution, you can hit failures. This PR applies an advisory lock to the source distribution directory. We apply it unconditionally, even if we ultimately find something in the cache and _don't_ do a build, which helps ensure that we only build the distribution once (and wait for that build to complete) rather than kicking off builds from each thread. Closes https://github.com/astral-sh/uv/issues/3512. ## Test Plan Ran: ```sh #!/bin/bash make_venv(){ target/debug/uv venv $1 source $1/bin/activate target/debug/uv pip install opentracing --no-deps --verbose } for i in {1..8} do make_venv ./$1/$i & done ```
Author
Parents
  • crates
    • uv-cache/src
      • File
        lib.rs
    • uv-distribution/src/source
      • File
        mod.rs
    • uv/tests
      • File
        pip_sync.rs
Loading