Cant find pyproject.toml/setup.py with SDIST path
### Description
I have setup where I build sdists, and then (try) to use them with cibuildwheel in a GH Actions file. But after upgrading to 3.4.1 I get `Error: cibuildwheel: Could not find any of {setup.py, setup.cfg, pyproject.toml} at root of package`. I have both a setup.py and pyproject.toml and it worked fine with 3.4.0 and earlier versions.
Error:
```
Run pypa/cibuildwheel@v3.4.1
Run actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
Installed versions
Run # Install cibuildwheel and build the command line
Install cibuildwheel
Run export PATH="$CIBW_PREPEND_PATH:$PATH"
export PATH="$CIBW_PREPEND_PATH:$PATH"
eval "$CIBW_CMD_BASH" 2>&1
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
SDIST_PATH: dist/pymunk-7.2.0.tar.gz
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* cp314t-* pp311-*
CIBW_PREPEND_PATH: /home/runner/work/_temp/cibw/bin.clean
CIBW_CMD_BASH: /home/runner/work/_temp/cibw/bin/cibuildwheel '$SDIST_PATH' --output-dir wheelhouse
Error: cibuildwheel: Could not find any of {setup.py, setup.cfg, pyproject.toml} at root of package
```
Relevant part of the GH action:
```
- name: Build sdist
run: |
pipx run build --sdist
python3 -c "import os,pathlib,glob; pathlib.Path(os.environ['GITHUB_ENV']).write_text('SDIST_PATH=' + glob.glob('dist/*.tar.gz')[0] + '\n')"
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* cp314t-* pp311-*"
with:
package-dir: "$SDIST_PATH"
```
(full logs and yml file linked)
### Build log
https://github.com/viblo/pymunk/actions/runs/25609835563/job/75178025119?pr=307
### CI config
https://github.com/viblo/pymunk/blob/2a3dea7d59833e97fca34414e02c72e6e0851761/.github/workflows/wheels.yml
关闭于 2026-05-10 2 条评论