Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maturin failed: No such file or directory (os error 2) #1285

Closed
2 tasks done
LilyFoote opened this issue Nov 22, 2022 · 1 comment · Fixed by #1288
Closed
2 tasks done

maturin failed: No such file or directory (os error 2) #1285

LilyFoote opened this issue Nov 22, 2022 · 1 comment · Fixed by #1288
Labels
bug Something isn't working sdist Source distribution

Comments

@LilyFoote
Copy link

Bug Description

Running python -m build for my project fails with maturin 0.14.1 and the new src project structure.

Your Python version (python -V)

Python 3.11.0

Your pip version (pip -V)

pip 22.3.1 from /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages/pip (python 3.11)

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

Create a mixed rust/python project using the new python src layout introduced in maturin 0.14.

Run python -m build:

$ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (maturin>=0.14,<0.15)
* Getting build dependencies for sdist...
* Building sdist...
Running `maturin pep517 write-sdist --sdist-directory /home/lily/work/klopp/kolo/python/dist`
💥 maturin failed
  Caused by: No such file or directory (os error 2)
Error: command ['maturin', 'pep517', 'write-sdist', '--sdist-directory', '/home/lily/work/klopp/kolo/python/dist'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_sdist

Or run maturin directly:

$ maturin pep517 write-sdist --sdist-directory ~/work/klopp/kolo/python/dist/
💥 maturin failed
  Caused by: No such file or directory (os error 2)

maturin develop runs with no errors:

$ maturin develop
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.11 at /home/lily/.virtualenvs/kolo/bin/python
Ignoring importlib_metadata: markers 'python_version < "3.8"' don't match your environment
Ignoring tomli: markers 'python_version < "3.11"' don't match your environment
Ignoring jinja2: markers 'extra == "test_generation"' don't match your environment
Requirement already satisfied: cerberus>=1.3.4 in /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages (1.3.4)
Requirement already satisfied: click>=7.1.2 in /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages (8.1.3)
Requirement already satisfied: toolz>=0.11.1 in /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages (0.12.0)
Requirement already satisfied: ulid-py>=1.1.0 in /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages (1.1.0)
Requirement already satisfied: setuptools in /home/lily/.virtualenvs/kolo/lib/python3.11/site-packages (from cerberus>=1.3.4) (65.5.0)
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
📦 Built wheel for CPython 3.11 to /tmp/.tmpCNEjwL/kolo-2.2.1-cp311-cp311-linux_x86_64.whl
🛠  Installed kolo-2.2.1

As does cargo build (from the rust subdirectory):

$ cd rust
$ cargo build
   Compiling pyo3-build-config v0.17.3
   Compiling pyo3-ffi v0.17.3
   Compiling pyo3 v0.17.3
   Compiling _kolo v2.2.1 (/home/lily/work/klopp/kolo/python/rust)
    Finished dev [unoptimized + debuginfo] target(s) in 2.95s
@LilyFoote LilyFoote added the bug Something isn't working label Nov 22, 2022
@messense messense added the sdist Source distribution label Nov 23, 2022
bors bot added a commit that referenced this issue Nov 23, 2022
1288: Fix generating pep517 sdist for src-layout r=messense a=messense

Fixes #1285 

Co-authored-by: messense <[email protected]>
@messense
Copy link
Member

Thanks for the report! Fixed in #1288.

bors bot added a commit that referenced this issue Nov 23, 2022
1288: Fix generating pep517 sdist for src-layout r=messense a=messense

Fixes #1285 

Co-authored-by: messense <[email protected]>
@bors bors bot closed this as completed in 41edf7b Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdist Source distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants