Skip to content

Commit e960225

Browse files
authored
Merge pull request #100 from martinRenou/fix_version_py
Generate _version.py at build time
2 parents fafd1b1 + db0568f commit e960225

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ dmypy.json
116116

117117
# Yarn cache
118118
.yarn/
119+
120+
# This is generated by hatch
121+
jupyterlab_blockly/_version.py

jupyterlab_blockly/_version.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ dev = [
3737
[tool.hatch.version]
3838
source = "nodejs"
3939

40+
[tool.hatch.build.hooks.version]
41+
path = "jupyterlab_blockly/_version.py"
42+
4043
[tool.hatch.metadata.hooks.nodejs]
4144
fields = ["description", "authors", "urls"]
4245

@@ -83,9 +86,7 @@ before-build-npm = [
8386
]
8487
before-build-python = [
8588
# Build the assets
86-
"jlpm build:prod",
87-
# Clean the build artifacts to not include them in sdist
88-
"jlpm clean"
89+
"jlpm build:prod"
8990
]
9091

9192
[tool.check-wheel-contents]

0 commit comments

Comments
 (0)