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

Create inv web.build #507

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Create inv web.build #507

merged 1 commit into from
Jul 12, 2024

Conversation

AlanRosenthal
Copy link
Collaborator

This command will build a wheel, copy it in the web directory, and create a file packageFile with the name of the wheel. If the correct override param is given, bumble.js will read packageFile and load that package.

This command will build a wheel, copy it in the web directory, and create a file `packageFile` with the name of the wheel. If the correct override param is given, bumble.js will read `packageFile` and load that package.
newest_wheel = Path(max(glob.glob('dist/*.whl'), key=lambda f: os.path.getmtime(f)))
shutil.copy(newest_wheel, Path('web/'))
# Step 3: Write wheel's name to web/packageFile
with open(Path('web', 'packageFile'), mode='w') as package_file:
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be simpler to just copy the built .whl file to just web/bumble.whl rather than go through the indirection of a text file pointing to the built file.
Then the web page can just reference ?package=bumble.whl.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately doing that results in this error message:

packaging.utils.InvalidWheelFilename: Invalid wheel filename (wrong number of parts): bumble

Copy link
Collaborator

Choose a reason for hiding this comment

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

Bummer.

@barbibulle barbibulle merged commit 87fa02d into main Jul 12, 2024
57 checks passed
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