-
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing member in
Cargo.toml
for sdist of nested workspace layo…
…ut (#1828) * use file_name to get bindings manifest name * update test readme * strip workspace root instead of using filename * fix test and apply clippy suggestion * Try to fix windows test failure --------- Co-authored-by: messense <messense@icloud.com>
- Loading branch information
Showing
18 changed files
with
446 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# pyo3-mixed src layout | ||
|
||
A package for testing maturin with a nested workspace. | ||
|
||
## Usage | ||
|
||
```bash | ||
pip install . | ||
``` | ||
|
||
```python | ||
import pyo3_mixed_workspace | ||
assert pyo3_mixed_workspace.get_42() == 42 | ||
``` |
7 changes: 7 additions & 0 deletions
7
test-crates/pyo3-mixed-workspace/check_installed/check_installed.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import pyo3_mixed_workspace as pyo3_mixed | ||
|
||
assert pyo3_mixed.get_42() == 42 | ||
|
||
print("SUCCESS") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[build-system] | ||
requires = ["maturin>=1.0,<2.0"] | ||
build-backend = "maturin" | ||
|
||
[project] | ||
name = "pyo3-mixed-workspace" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Rust" | ||
] | ||
requires-python = ">=3.7" | ||
|
||
[project.scripts] | ||
get_42 = "pyo3_mixed_workspace:get_42" | ||
|
||
[tool.maturin] | ||
python-packages = ["pyo3_mixed_workspace", "tests"] | ||
module-name = "pyo3_mixed_workspace.pyo3_mixed_workspace_py" | ||
manifest-path = "rust/python/pyo3-mixed-workspace-py/Cargo.toml" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"pyo3-mixed-workspace", | ||
"python/pyo3-mixed-workspace-py", | ||
] |
7 changes: 7 additions & 0 deletions
7
test-crates/pyo3-mixed-workspace/rust/pyo3-mixed-workspace/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "pyo3-mixed-workspace" | ||
version = "2.1.3" | ||
description = "Implements a dummy function combining rust and python" | ||
edition = "2021" | ||
|
||
[dependencies] |
3 changes: 3 additions & 0 deletions
3
test-crates/pyo3-mixed-workspace/rust/pyo3-mixed-workspace/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn get_21_lib() -> usize { | ||
21 | ||
} |
Oops, something went wrong.