Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 74881a1

Browse files
committed
chore: moving python package to a subdirectory
It is needed to prevent import errors as the repo root sometimes gets into the PYTHONPATH, e.g. when python interactive is used. In that case the native extension may not be loadable. See also PyO3/maturin#490
1 parent f5995c1 commit 74881a1

File tree

6 files changed

+6
-2
lines changed

6 files changed

+6
-2
lines changed

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"Cargo.toml"
9292
"Cargo.lock"
9393
"pyproject.toml"
94-
"unblob_native"
94+
"python"
9595
"benches"
9696
"src"
9797
"README.md"

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ build-backend = "maturin"
3838

3939
[tool.maturin]
4040
module-name = "unblob_native._native"
41+
python-source = "python"
4142

4243
features = [
4344
"pyo3/extension-module", # This is an extension module
@@ -89,7 +90,7 @@ ignore = [
8990
]
9091

9192
[tool.ruff.per-file-ignores]
92-
"unblob_native/__init__.py" = [
93+
"python/unblob_native/__init__.py" = [
9394
"F403",
9495
"A001",
9596
"F405",
@@ -100,6 +101,9 @@ ignore = [
100101
"S101", # assert: Enable usage of asserts
101102
]
102103

104+
[tool.ruff.isort]
105+
known-first-party = ["unblob_native"]
106+
103107
[tool.ruff.flake8-pytest-style]
104108
fixture-parentheses = false
105109
mark-parentheses = false
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)