Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@

NAME: str = dist.get_name() # type: ignore

# Check if building for Pyodide
is_pyodide = os.getenv("PYODIDE", "0") == "1"

if is_pyodide:
# For pyodide we build a universal wheel that must be pure-python
# so we must omit the cython-version of scan.
# Build without optional compiled extensions. Keep PYODIDE as a compatibility
# alias for existing downstream builds.
is_pure_python = (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just cosmetic I assume? You could have used the PYODIDE flag?

os.getenv("PYTENSOR_PURE_PYTHON", "0") == "1" or os.getenv("PYODIDE", "0") == "1"
)

if is_pure_python:
# Omit the optional Cython implementation of scan.
ext_modules = []
else:
ext_modules = [
Expand Down
Loading