Skip to content

Commit

Permalink
Build js file at package time & cleanu sdist
Browse files Browse the repository at this point in the history
- Stop including the built JS file in the package, instead it
  is built during sdist time (and hence included in the
  wheel). Stolen / inspired from JupyterHub itself.
- setuptool_scm includes *all* checked-in files by default in
  the sdist (pypa/setuptools-scm#190).
  This cleans it out to trim down the size of our sdist
- I think our previous wheel files didn't actually have the
  python package correctly. It is set up correctly now.
- Generated js files are put under a dist/, so we can have
  non-generated static files under static/ in the future. dist/
  is added to .gitignore
  • Loading branch information
yuvipanda committed Nov 14, 2023
1 parent a2af374 commit 37a392f
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 48,114 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ cython_debug/

# JS is everywhere
node_modules/

# Built files should not be in the package
static/dist/
23 changes: 19 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
include LICENSE
include README.md
graft jupyterhub_fancy_profiles/templates
graft jupyterhub_fancy_profiles/static
# setuptools-scm puts all tracked files here already. We need to
# prune files we don't want in our sdist, and include generated files
# Ideally we can simply just *include* files we want, but I have given up
# on that for now.

# Add generated files
graft jupyterhub_fancy_profiles/static/dist

# Remove JS files that we won't need when installed
exclude src/*
exclude webpack.config.js

# Remove docs & dev time needs we won't need when installed in sdist
exclude CONTRIBUTING.md
exclude dev-requirements.txt
exclude jupyterhub_config.py
exclude binderhub_config.py
exclude package.json
exclude screenshot.png
Loading

0 comments on commit 37a392f

Please sign in to comment.