-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
- 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
plugins/ui/setup.py
Outdated
# remove the build directory to ensure that the package is built from the latest js files | ||
try: | ||
shutil.rmtree("build") | ||
except FileNotFoundError: | ||
pass |
There was a problem hiding this comment.
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
This should also be added to the other plugins that package JS. I wonder if it should be part of the |
- I mis-read the details, `include_package_data` is only True when configured via pyproject.toml file
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.
npm run build
between builds