Skip to content

Commit

Permalink
Merge pull request #100 from martinRenou/fix_version_py
Browse files Browse the repository at this point in the history
Generate _version.py at build time
  • Loading branch information
DenisaCG authored Aug 26, 2024
2 parents fafd1b1 + db0568f commit e960225
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ dmypy.json

# Yarn cache
.yarn/

# This is generated by hatch
jupyterlab_blockly/_version.py
23 changes: 0 additions & 23 deletions jupyterlab_blockly/_version.py

This file was deleted.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ dev = [
[tool.hatch.version]
source = "nodejs"

[tool.hatch.build.hooks.version]
path = "jupyterlab_blockly/_version.py"

[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]

Expand Down Expand Up @@ -83,9 +86,7 @@ before-build-npm = [
]
before-build-python = [
# Build the assets
"jlpm build:prod",
# Clean the build artifacts to not include them in sdist
"jlpm clean"
"jlpm build:prod"
]

[tool.check-wheel-contents]
Expand Down

0 comments on commit e960225

Please sign in to comment.