Comments (6)
I'm unable to reproduce this on macOS.
$ python -m maturin develop
Updating crates.io index
🔗 Found pyo3 bindings
🐍 Found CPython 3.12 at /Users/messense/.pyenv/versions/3.12.0/envs/test/bin/python
📡 Using build options features from pyproject.toml
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling target-lexicon v0.12.14
Compiling once_cell v1.19.0
Compiling autocfg v1.2.0
Compiling proc-macro2 v1.0.81
Compiling unicode-ident v1.0.12
Compiling libc v0.2.153
Compiling parking_lot_core v0.9.9
Compiling portable-atomic v1.6.0
Compiling heck v0.4.1
Compiling scopeguard v1.2.0
Compiling smallvec v1.13.2
Compiling cfg-if v1.0.0
Compiling unindent v0.2.3
Compiling indoc v2.0.5
Compiling lock_api v0.4.11
Compiling memoffset v0.9.1
Compiling pyo3-build-config v0.20.3
Compiling quote v1.0.36
Compiling syn v2.0.60
Compiling parking_lot v0.12.1
Compiling pyo3-ffi v0.20.3
Compiling pyo3 v0.20.3
Compiling pyo3-macros-backend v0.20.3
Compiling pyo3-macros v0.20.3
Compiling hello v0.1.0 (/Users/messense/Projects/maturin/hello)
error[E0308]: mismatched types
--> src/lib.rs:5:41
|
5 | fn sum_as_string(a: usize, b: usize) -> PyResult<String> {}
| ------------- ^^^^^^^^^^^^^^^^ expected `Result<String, PyErr>`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `Result<String, PyErr>`
found unit type `()`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `hello` (lib) due to 1 previous error
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/Users/messense/.pyenv/versions/3.12.0/envs/test/bin/python" PYTHON_SYS_EXECUTABLE="/Users/messense/.pyenv/versions/3.12.0/envs/test/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/messense/Projects/maturin/hello/Cargo.toml" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/hello.cpython-312-darwin.so"`
$ echo $?
1
from maturin.
We are using os.execv to replace python -m maturin
process with maturin
so it's unlikely the exit code will differ.
from maturin.
(.venv) ❯❯ ~\..\bencode2 git:(perf) python -m maturin q
(.venv) error: unrecognized subcommand 'q'
Usage: maturin <COMMAND>
For more information, try '--help'.
❯❯ ~\..\bencode2 git:(perf) echo $LastExitCode
0
(.venv) ❯❯ ~\..\bencode2 git:(perf) maturin q
error: unrecognized subcommand 'q'
Usage: maturin.exe <COMMAND>
For more information, try '--help'.
(.venv) ❯❯ ~\..\bencode2 git:(perf) echo $LastExitCode
2
(.venv) ❯❯ ~\..\bencode2 git:(perf)
from maturin.
We are using os.execv to replace
python -m maturin
process withmaturin
so it's unlikely the exit code will differ.
it's a cpython bug on windows
from maturin.
I don't have a windows machine near me, so pull requests are welcome if you want to contribute a fix for Windows.
from maturin.
I've changed the title to reflect the fact it's a Windows specific issue.
from maturin.
Related Issues (20)
- "Failed to normalize readme path `README.md`" when it exists HOT 7
- [bug] Maturin's wheel contains two copies of LICENSE when using license-file in workspace crate Cargo.toml
- data always set file permission as executable HOT 1
- Ability to specify `tool.maturin.source` similar to `tool.poetry.source` HOT 2
- generate-ci'd emscripten pytest fails before reaching module code HOT 5
- Cannot figure out how to use `--config` to override a value from the pyproject.toml HOT 2
- .sig/.crt signing artifacts no longer uploaded to Github Releases HOT 1
- What happened to `maturin new`?
- CARGO=cross uses wrong --manifest-path HOT 2
- Compile UniFFI interfaces defined in sibling libraries HOT 5
- Allow for env to silence "missing build backend" warning HOT 3
- Use user-specified library search paths in `RUSTFLAGS` in auditwheel HOT 1
- Maturin infers target is apple darwin on linux HOT 6
- Improve iOS target support
- Allow overriding python platform with `_PYTHON_HOST_PLATFORM` env var HOT 4
- RECORD file is missing entries for some files HOT 7
- Windows aarch64 build fails: "no cab files were referenced by the MSI" HOT 2
- Adapt rustc 1.79 HOT 1
- Package Independent Configuration
- Generated Github release workflow does not build wheels for Python 3.8 - 3.10 for MacOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maturin.