Skip to content

Commit 3a0c041

Browse files
author
aandres
committed
Move code to python dir
1 parent 055c6d2 commit 3a0c041

File tree

9 files changed

+12
-2
lines changed

9 files changed

+12
-2
lines changed

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
args: --out dist
3636
- name: "Test sdist"
3737
run: |
38+
tar -ztvf dist/${{ env.PACKAGE_NAME }}-*.tar.gz
3839
pip install dist/${{ env.PACKAGE_NAME }}-*.tar.gz --force-reinstall
3940
python -c "import ptars"
4041
- name: "Upload sdist"

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ license = "Apache-2.0"
1313
publish = false # handled by GitHub Actions
1414
push = true
1515

16+
17+
[package.metadata.maturin]
18+
name = "ptars._lib"
19+
20+
1621
[lib]
1722
crate-type = ["cdylib"]
23+
name = "ptars"
1824

1925
[dependencies]
2026
pyo3 = { version = "0.20.3" }

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ maturin = "^1.3.1"
7070

7171
[tool.maturin]
7272
module-name = "ptars._lib"
73+
bindings = "pyo3"
74+
python-packages = ["ptars"]
75+
python-source = "python"
76+
exclude = ["python/test/**", ".**", "sdist/**"]
7377

7478
[tool.isort]
7579
profile = "black"
File renamed without changes.
File renamed without changes.
File renamed without changes.

python/test/__init__.py

Whitespace-only changes.
File renamed without changes.

test/test_ptars.py python/test/test_ptars.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
from test.random_generator import generate_messages
2-
31
import pyarrow as pa
42
import pytest
53
from google.protobuf.message import Message
64

75
from ptars import HandlerPool
86
from ptars_protos import simple_pb2
97
from ptars_protos.bench_pb2 import ExampleMessage
8+
from python.test.random_generator import generate_messages
109

1110
MESSAGES = [ExampleMessage]
1211

0 commit comments

Comments
 (0)