Skip to content

Commit

Permalink
Ship rerun package inside of a rerun_sdk folder (rerun-io#1085)
Browse files Browse the repository at this point in the history
* Ship rerun package inside of a rerun_sdk folder
  • Loading branch information
jleibs authored Feb 5, 2023
1 parent 8fe38c0 commit 92933c0
Show file tree
Hide file tree
Showing 45 changed files with 381 additions and 350 deletions.
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
files = rerun_py/rerun, rerun_py/tests, examples
files = rerun_py/rerun_sdk/rerun, rerun_py/tests, examples
exclude = examples/objectron/dataset/proto
namespace_packages = True
show_error_codes = True
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ pyo3-build-config = "0.18.0"
toml = "0.7"

[package.metadata.maturin]
name = "rerun.rerun_bindings"
name = "rerun_bindings"
2 changes: 1 addition & 1 deletion rerun_py/docs/gen_common_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
]

# Virual folder where we will generate the md files
root = Path(__file__).parent.parent.resolve()
root = Path(__file__).parent.parent.joinpath("rerun_sdk").resolve()
common_dir = Path("common")

# We use griffe to access docstrings
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/docs/gen_package_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

import mkdocs_gen_files

root = Path(__file__).parent.parent.resolve()
root = Path(__file__).parent.parent.joinpath("rerun_sdk").resolve()
package_dir = Path("package")

nav = mkdocs_gen_files.Nav()
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins:
custom_templates: rerun_py/docs/templates # Override the function template. NOTE: relative to working directory. (https://github.com/mkdocstrings/mkdocstrings/issues/477)
handlers:
python:
paths: ["."] # Lookup python modules relative to this path
paths: ["rerun_sdk"] # Lookup python modules relative to this path
import: # Cross-references for python and numpy
- https://docs.python.org/3/objects.inv
- https://numpy.org/doc/stable/objects.inv
Expand Down
6 changes: 6 additions & 0 deletions rerun_py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ line-length = 120
target-version = ["py38"]

[tool.maturin]
# We use a python package from inside the rerun_sdk folder to avoid conflicting
# with the other `rerun` pypi package. The rerun_sdk.pth adds this to the pythonpath
# which then allows `import rerun` to work as expected.
# See https://github.com/rerun-io/rerun/pull/1085 for more details
include = ["rerun_sdk.pth"]
locked = true
python-packages = ["rerun_sdk/rerun"]
Loading

0 comments on commit 92933c0

Please sign in to comment.