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

build: Clean the build directory before building the wheel #599

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Jul 4, 2024

- When rebuilding the wheel, it had stale files for the _js files, which was confusing and annoying
- Clean the build directory so it doesn't have stale files
- Remove the `package_data` flag - it's already captured by default with the `include_package_data` option: https://setuptools.pypa.io/en/latest/userguide/datafiles.html#include-package-data
- Still need to run `npm run build` between builds
@mofojed mofojed requested a review from jnumainville July 4, 2024 14:39
@mofojed mofojed self-assigned this Jul 4, 2024
Comment on lines 9 to 13
# remove the build directory to ensure that the package is built from the latest js files
try:
shutil.rmtree("build")
except FileNotFoundError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we also add a block like this for dist? Around releases I will sometimes end up w/ re-using my install command from before the release that will point to a 0.15.0 build. But really I've updated to 0.16.0 in my build. However, the old wheels still exist in dist and that has caused me confusion at least once wondering why my server didn't seem to update the plugin properly

@mattrunyon
Copy link
Collaborator

mattrunyon commented Jul 5, 2024

This should also be added to the other plugins that package JS. I wonder if it should be part of the packaging or utilities plugin instead so it can just be consistently imported across all our plugins

@mofojed mofojed requested a review from mattrunyon July 12, 2024 17:25
- I mis-read the details, `include_package_data` is only True when configured via pyproject.toml file
@mofojed mofojed enabled auto-merge (squash) July 12, 2024 18:22
@mofojed mofojed merged commit a2459bd into deephaven:main Jul 12, 2024
15 checks passed
jnumainville added a commit that referenced this pull request Jul 29, 2024
We recently merged #599 which works fine locally but appears to remove
the `whl` file in our gh actions.
There are other solutions we can investigate, but this is just to get ui
docs built so any better solution is beyond the scope of this.
It's worth noting that `plugin_builder.py` also will clean the
directories up automatically and might be the better path forward for
development cases.
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.

Python builds can break when starting from dirty state
3 participants