Skip to content

Commit

Permalink
Make it possible to build wheels with extra features
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Nov 5, 2024
1 parent 8b2b7b3 commit 1213068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rerun_py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ name = "rerun_bindings" # name of the .so library that the Python module will im
[features]
default = ["extension-module"]

## Extra features that aren't ready to be included in release builds yet.
extra = ["pypi", "remote"]

## The features we turn on when building the `rerun-sdk` PyPi package
## for <https://pypi.org/project/rerun-sdk/>.
pypi = ["extension-module", "nasm", "web_viewer"]
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/build_and_upload_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def detect_target() -> str:
class BuildMode(Enum):
PYPI = "pypi"
PR = "pr"
EXTRA = "extra"

def __str__(self) -> str:
return self.value
Expand All @@ -68,6 +69,8 @@ def build_and_upload(bucket: Bucket | None, mode: BuildMode, gcs_dir: str, targe
maturin_feature_flags = "--no-default-features --features pypi"
elif mode is BuildMode.PR:
maturin_feature_flags = "--no-default-features --features extension-module"
elif mode is BuildMode.EXTRA:
maturin_feature_flags = "--no-default-features --features extra"

dist = f"dist/{target}"

Expand Down

0 comments on commit 1213068

Please sign in to comment.