-
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
423 additions
and
6 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .python_module.double import double | ||
from .my_submodule.double import double | ||
from .pyo3_mixed import get_21 | ||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
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,23 @@ | ||
[package] | ||
authors = ["konstin <[email protected]>"] | ||
name = "pyo3-src-layout" | ||
version = "2.1.3" | ||
description = "Implements a dummy function combining rust and python using the python_src layout" | ||
readme = "Readme.md" | ||
edition = "2018" | ||
|
||
[package.metadata.maturin.scripts] | ||
get_42 = "pyo3_mixed:get_42" | ||
|
||
[package.metadata.maturin] | ||
classifier = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Rust" | ||
] | ||
|
||
[dependencies] | ||
pyo3 = { version = "0.13.2", features = ["extension-module"] } | ||
|
||
[lib] | ||
name = "pyo3_src_layout" | ||
crate-type = ["cdylib"] |
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,30 @@ | ||
# pyo3-mixed | ||
|
||
A package for testing maturin with a mixed pyo3/python project. | ||
|
||
## Usage | ||
|
||
```bash | ||
pip install . | ||
``` | ||
|
||
```python | ||
import pyo3_mixed | ||
assert pyo3_mixed.get_42() == 42 | ||
``` | ||
|
||
## Testing | ||
|
||
Install tox: | ||
|
||
```bash | ||
pip install tox | ||
``` | ||
|
||
Run it: | ||
|
||
```bash | ||
tox | ||
``` | ||
|
||
The tests are in `test_pyo3_mixed.py`, while the configuration is in tox.ini |
7 changes: 7 additions & 0 deletions
7
test-crates/pyo3-src-layout/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_src_layout | ||
|
||
assert pyo3_src_layout.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,3 @@ | ||
[build-system] | ||
requires = ["maturin>=0.10,<0.11"] | ||
build-backend = "maturin" |
6 changes: 6 additions & 0 deletions
6
test-crates/pyo3-src-layout/python_src/pyo3_src_layout/__init__.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,6 @@ | ||
from .my_submodule.double import double | ||
from .pyo3_src_layout import get_21 | ||
|
||
|
||
def get_42() -> int: | ||
return double(get_21) |
Empty file.
Oops, something went wrong.