You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've adopted maturin for distributing my pre-commit hooks so people can use the pre-built wheels. Unfortunately, I just got a bug report (crate-ci/typos#713) that the sdist fails to build because it can't find the Cargo.toml
Collecting typos==1.13.20
Using cached typos-1.13.20.tar.gz (1.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
💥 maturin failed
Caused by: Can't find /tmp/pip-install-h_ghf2j0/typos_b9b297fa519b4611aa15b3189fe4a7b7/Cargo.toml (in /tmp/pip-install-h_ghf2j0/typos_b9b297fa519b4611aa15b3189fe4a7b7)
Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-rwz40ctg', '--interpreter', '/home/epage/src/personal/typos/foo/bin/python3']' returned non-zero exit status 1.
Checking for Rust toolchain....
Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-rwz40ctg --interpreter /home/epage/src/personal/typos/foo/bin/python3`
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I can reproduce it locally but its not all clear what is going on behind the scenes that is causing this to fail. I would have assumed the wheels are created from the sdist but our CI job passes that creates all wheels and sdist
Note: moved typos-cli into the crates folder so I could have a pure-python pyproject.toml in the root for pre-commit to use because it always installs the top-level package from source
When writing the reason why we switched from 1.13.20's layout to 1.14.7's, that means it did work at some point (crate-ci/typos#682), so I'm a bit confused as to why its not working for me right now or the person who opened the issue on my repo.
So the problem is that in workspace Cargo.toml, pyproject.toml isn't in the include list, so cargo package --list doesn't include it, add pyproject.toml to it should fix it.
Bug Description
I've adopted maturin for distributing my pre-commit hooks so people can use the pre-built wheels. Unfortunately, I just got a bug report (crate-ci/typos#713) that the sdist fails to build because it can't find the
Cargo.toml
I can reproduce it locally but its not all clear what is going on behind the scenes that is causing this to fail. I would have assumed the wheels are created from the sdist but our CI job passes that creates all wheels and sdist
Doing a quick comparison
ruff
(assuming sdist works)/pyproject.toml
/crates/ruff-cli/Cargo.toml
tool.maturin.manifest-path
for this to work/pyproject.toml
/Cargo.toml
/crates/typos-cli/pyproject.toml
/crates/typos-cli/Cargo.toml
typos-cli
into thecrates
folder so I could have a pure-pythonpyproject.toml
in the root for pre-commit to use because it always installs the top-level package from sourceWhen writing the reason why we switched from 1.13.20's layout to 1.14.7's, that means it did work at some point (crate-ci/typos#682), so I'm a bit confused as to why its not working for me right now or the person who opened the issue on my repo.
ruff sdist includes:
1.13.20 sdist includes:
1.14.7 sdist includes:
Unsure why I have a
Cargo.lock
in the root butruff
does notYour maturin version (
maturin --version
)0.14.17
Your Python version (
python -V
)Python 3.10.6
Your pip version (
pip -V
)pip 22.0.2
What bindings you're using
bin
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
pip install typos --no-binary typos
The text was updated successfully, but these errors were encountered: