Skip to content

Commit

Permalink
build: Clean the build directory before building the wheel
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mofojed committed Jul 4, 2024
1 parent 1623ff5 commit ff2119e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/ui/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
from setuptools import setup
import os
import shutil
from deephaven.plugin.packaging import package_js

js_dir = "src/js/"
dest_dir = os.path.join("src/deephaven/ui/_js")

# remove the build directory to ensure that the package is built from the latest js files
try:
shutil.rmtree("build")
except FileNotFoundError:
pass

package_js(js_dir, dest_dir)

setup(package_data={"deephaven.ui._js": ["**"]})
setup()

0 comments on commit ff2119e

Please sign in to comment.