Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libshortfin] Fix standalone Python package build to include subpackages. #223

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd enabled auto-merge (squash) September 26, 2024 19:16
@ScottTodd ScottTodd merged commit 5957d60 into nod-ai:main Sep 26, 2024
6 of 8 checks passed
@ScottTodd ScottTodd deleted the libshortfin-packaging branch September 26, 2024 19:17
stellaraccident pushed a commit that referenced this pull request Sep 26, 2024
…subpackages." (#224)

Reverts #223

This broke a build:
https://github.com/nod-ai/SHARK-Platform/actions/runs/11058808130/job/30725674259#step:9:86
```
 ImportError while loading conftest '/home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin/tests/conftest.py'.
tests/conftest.py:10: in <module>
    import shortfin as sf
E   ModuleNotFoundError: No module named 'shortfin'
```
ScottTodd added a commit that referenced this pull request Sep 26, 2024
… subpackages." (#225)

Progress on #130.
This reverts #224 to
re-land #223.

This now uses `SOURCE_DIR` instead of `SETUPPY_DIR` to fix package
discovery when running in pre-built mode, which will fix the errors
reported on CI:
```
 ImportError while loading conftest '/home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin/tests/conftest.py'.
tests/conftest.py:10: in <module>
    import shortfin as sf
E   ModuleNotFoundError: No module named 'shortfin'
```

Logs from a failed build:
```
   setup.py running in pre-built mode:
    SOURCE_DIR = /home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin
    BINARY_DIR = /home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin/build
  Found libshortfin packages: ['_shortfin_default']
```

Logs from a successful build:
```
   setup.py running in pre-built mode:
    SOURCE_DIR = /home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin
    BINARY_DIR = /home/runner/work/SHARK-Platform/SHARK-Platform/libshortfin/build
  Found libshortfin packages: ['shortfin_apps', 'shortfin', '_shortfin', 'shortfin_apps.llm', 'shortfin_apps.llm.components', 'shortfin.interop', 'shortfin.support', 'shortfin.interop.fastapi', 'shortfin.interop.support']
```

---------

Co-authored-by: Marius Brehler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants