Skip to content

Commit

Permalink
Merge pull request #11758 from carlopi/pyodide_no_source
Browse files Browse the repository at this point in the history
Allow to build python packages without c++ sources
  • Loading branch information
Mytherin committed Apr 22, 2024
2 parents 4e8274b + 574b101 commit c861b2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/Pyodide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ on:
paths-ignore:
- "**"
- "!.github/workflows/Pyodide.yml"
- "!tools/pythonpkg/setup.py"

pull_request:
types: [opened, reopened, ready_for_review]
paths-ignore:
- "**"
- "!.github/workflows/Pyodide.yml"
- "!tools/pythonpkg/setup.py"

jobs:
build_pyodide:
Expand Down Expand Up @@ -91,6 +93,10 @@ jobs:
assert platform == "wasm_eh_pyodide", platform
EOF
- name: Wheel sizes
run: |
ls -lah ./tools/pythonpkg/dist/*.whl
- uses: actions/upload-artifact@v3
with:
name: pyodide-python${{ matrix.version.python }}
Expand Down
3 changes: 3 additions & 0 deletions tools/pythonpkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class build_ext(CompilerLauncherMixin, _build_ext):

is_android = hasattr(sys, 'getandroidapilevel')
is_pyodide = 'PYODIDE' in os.environ
no_source_wheel = is_pyodide
use_jemalloc = (
not is_android
and not is_pyodide
Expand Down Expand Up @@ -355,6 +356,8 @@ def setup_data_files(data_files):


data_files = setup_data_files(extra_files + header_files)
if no_source_wheel:
data_files = []

packages = [
lib_name,
Expand Down

0 comments on commit c861b2d

Please sign in to comment.