|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "lab_extension" |
| 7 | +readme = "README.md" |
| 8 | +license = { file = "LICENSE" } |
| 9 | +requires-python = ">=3.8" |
| 10 | +classifiers = [ |
| 11 | + "Framework :: Jupyter", |
| 12 | + "Framework :: Jupyter :: JupyterLab", |
| 13 | + "Framework :: Jupyter :: JupyterLab :: 4", |
| 14 | + "Framework :: Jupyter :: JupyterLab :: Extensions", |
| 15 | + "Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt", |
| 16 | + "License :: OSI Approved :: BSD License", |
| 17 | + "Programming Language :: Python", |
| 18 | + "Programming Language :: Python :: 3", |
| 19 | + "Programming Language :: Python :: 3.8", |
| 20 | + "Programming Language :: Python :: 3.9", |
| 21 | + "Programming Language :: Python :: 3.10", |
| 22 | + "Programming Language :: Python :: 3.11", |
| 23 | +] |
| 24 | +dependencies = [ |
| 25 | + "jupyter_server>=2.0.1,<3" |
| 26 | +] |
| 27 | +dynamic = ["version", "description", "authors", "urls", "keywords"] |
| 28 | + |
| 29 | +[tool.hatch.version] |
| 30 | +source = "nodejs" |
| 31 | + |
| 32 | +[tool.hatch.metadata.hooks.nodejs] |
| 33 | +fields = ["description", "authors", "urls"] |
| 34 | + |
| 35 | +[tool.hatch.build.targets.sdist] |
| 36 | +artifacts = ["lab_extension/labextension"] |
| 37 | +exclude = [".github", "binder"] |
| 38 | + |
| 39 | +[tool.hatch.build.targets.wheel.shared-data] |
| 40 | +"lab_extension/labextension" = "share/jupyter/labextensions/lab-extension" |
| 41 | +"install.json" = "share/jupyter/labextensions/lab-extension/install.json" |
| 42 | +"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d" |
| 43 | +"jupyter-config/nb-config" = "etc/jupyter/jupyter_notebook_config.d" |
| 44 | + |
| 45 | +[tool.hatch.build.hooks.version] |
| 46 | +path = "lab_extension/_version.py" |
| 47 | + |
| 48 | +[tool.hatch.build.hooks.jupyter-builder] |
| 49 | +dependencies = ["hatch-jupyter-builder>=0.5"] |
| 50 | +build-function = "hatch_jupyter_builder.npm_builder" |
| 51 | +ensured-targets = [ |
| 52 | + "lab_extension/labextension/static/style.js", |
| 53 | + "lab_extension/labextension/package.json", |
| 54 | +] |
| 55 | +skip-if-exists = ["lab_extension/labextension/static/style.js"] |
| 56 | + |
| 57 | +[tool.hatch.build.hooks.jupyter-builder.build-kwargs] |
| 58 | +build_cmd = "build:prod" |
| 59 | +npm = ["jlpm"] |
| 60 | + |
| 61 | +[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs] |
| 62 | +build_cmd = "install:extension" |
| 63 | +npm = ["jlpm"] |
| 64 | +source_dir = "src" |
| 65 | +build_dir = "lab_extension/labextension" |
| 66 | + |
| 67 | +[tool.jupyter-releaser.options] |
| 68 | +version_cmd = "hatch version" |
| 69 | + |
| 70 | +[tool.jupyter-releaser.hooks] |
| 71 | +before-build-npm = [ |
| 72 | + "python -m pip install 'jupyterlab>=4.0.0,<5'", |
| 73 | + "jlpm", |
| 74 | + "jlpm build:prod" |
| 75 | +] |
| 76 | +before-build-python = ["jlpm clean:all"] |
| 77 | + |
| 78 | +[tool.check-wheel-contents] |
| 79 | +ignore = ["W002"] |
0 commit comments