11[build-system ]
22requires = [
3+ " hatch" ,
34 " hatchling" ,
5+ " hatch-nodejs-version" ,
6+ " hatch-build-scripts" ,
47 " jupyterlab>=3,<5" ,
58]
69build-backend = " hatchling.build"
@@ -16,6 +19,7 @@ keywords = [
1619 " IPython" ,
1720 " Jupyter" ,
1821 " Widgets" ,
22+ " Canvas" ,
1923]
2024classifiers = [
2125 " Framework :: Jupyter" ,
@@ -24,18 +28,21 @@ classifiers = [
2428 " License :: OSI Approved :: BSD License" ,
2529 " Programming Language :: Python" ,
2630 " Programming Language :: Python :: 3" ,
27- " Programming Language :: Python :: 3.8" ,
2831 " Programming Language :: Python :: 3.9" ,
2932 " Programming Language :: Python :: 3.10" ,
3033 " Programming Language :: Python :: 3.11" ,
3134 " Programming Language :: Python :: 3.12" ,
35+ " Programming Language :: Python :: 3.13" ,
36+ " Programming Language :: Python :: 3.14" ,
3237]
3338dependencies = [
3439 " ipywidgets>=7.6.0,<9" ,
3540 " numpy" ,
3641 " pillow>=6.0" ,
3742]
38- version = " 0.14.2"
43+ dynamic = [
44+ " version" ,
45+ ]
3946
4047[project .license ]
4148file = " LICENSE.txt"
@@ -45,10 +52,14 @@ file = "LICENSE.txt"
4552[project .urls ]
4653Homepage = " https://github.com/jupyter-widgets-contrib/ipycanvas"
4754
55+ [tool .hatch .version ]
56+ source = " nodejs"
57+
4858[tool .hatch .build ]
4959artifacts = [
5060 " ipycanvas/nbextension/static/index.*" ,
5161 " ipycanvas/labextension" ,
62+ " ipycanvas/_version.py" ,
5263]
5364
5465[tool .hatch .build .targets .wheel .shared-data ]
@@ -59,6 +70,7 @@ artifacts = [
5970[tool .hatch .build .targets .sdist ]
6071exclude = [
6172 " .github" ,
73+ " ipycanvas/_version.py" ,
6274]
6375
6476[tool .hatch .build .hooks .jupyter-builder ]
@@ -72,51 +84,18 @@ dependencies = [
7284]
7385build-function = " hatch_jupyter_builder.npm_builder"
7486
87+ [[tool .hatch .build .hooks .build-scripts .scripts ]]
88+ work_dir = " ."
89+ commands = [' python scripts/write_version.py' ]
90+ # _version.py is already mentioned in top-level build artifact
91+ artifacts = []
92+
7593[tool .hatch .build .hooks .jupyter-builder .build-kwargs ]
7694path = " ."
7795build_cmd = " build:extensions"
7896npm = [
7997 " yarn" ,
8098]
8199
82- [tool .tbump ]
83- field = [
84- { name = " channel" , default = " " },
85- { name = " release" , default = " " },
86- ]
87-
88- [tool .tbump .version ]
89- current = " 0.14.2"
90- regex = " (?P<major>\\ d+)\\ .(?P<minor>\\ d+)\\ .(?P<patch>\\ d+)((?P<channel>a|b|rc|.dev)(?P<release>\\ d+))?"
91-
92- [tool .tbump .git ]
93- message_template = " Bump to {new_version}"
94- tag_template = " v{new_version}"
95-
96- [[tool .tbump .file ]]
97- src = " pyproject.toml"
98- version_template = " version = \" {major}.{minor}.{patch}{channel}{release}\" "
99-
100- [[tool .tbump .file ]]
101- src = " ipycanvas/_version.py"
102-
103- [[tool .tbump .file ]]
104- src = " package.json"
105- version_template = " \" version\" : \" {major}.{minor}.{patch}{channel}{release}\" "
106-
107- [tool .jupyter-releaser .hooks ]
108- before-bump-version = [
109- " python -m pip install hatch jupyterlab~=4.0" ,
110- ]
111- before-build-npm = [
112- " python -m pip install jupyterlab~=4.0" ,
113- " jlpm" ,
114- " jlpm clean" ,
115- " jlpm build" ,
116- ]
117- before-build-python = [
118- " jlpm clean" ,
119- ]
120-
121100[tool .check-wheel-contents ]
122101ignore = [" W002" ]
0 commit comments