Skip to content

Commit 1c6204e

Browse files
committed
migrate build system to hatchling from setuptools
1 parent b009b25 commit 1c6204e

2 files changed

Lines changed: 18 additions & 48 deletions

File tree

MANIFEST.in

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

pyproject.toml

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[build-system]
2-
requires = ["setuptools>=71"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling >= 1.26"]
3+
build-backend = "hatchling.build"
44

55
[project.urls]
6-
"HomePage" = "https://plotly.com/python/"
6+
"Homepage" = "https://plotly.com/python/"
77
"Documentation" = "https://plotly.com/python/"
8-
"Github" = "https://github.com/plotly/plotly.py"
8+
"GitHub" = "https://github.com/plotly/plotly.py"
99
"Changelog" = "https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md"
1010

1111
[project]
@@ -18,7 +18,6 @@ maintainers = [
1818
{ name="Emily Kellison-Linn", email="emily@plot.ly" }
1919
]
2020
description = "An open-source interactive data visualization library for Python"
21-
readme = {file = "README.md", content-type = "text/markdown"}
2221
classifiers = [
2322
"Development Status :: 5 - Production/Stable",
2423
"Programming Language :: Python :: 3.8",
@@ -31,7 +30,8 @@ classifiers = [
3130
"License :: OSI Approved :: MIT License"
3231
]
3332
requires-python = ">=3.8"
34-
license = {file="LICENSE.txt"}
33+
license = "MIT"
34+
license-files = ["LICENSE.txt"]
3535
version = "6.6.0"
3636
dependencies = [
3737
"narwhals>=1.15.1",
@@ -50,7 +50,7 @@ dev_core = [
5050
dev_build = [
5151
"plotly[dev_core]",
5252
"build",
53-
"jupyter"
53+
"jupyterlab"
5454
]
5555
dev_optional = [
5656
"plotly[dev_build]",
@@ -91,43 +91,16 @@ markers = [
9191
"matplotlib: mark a test as matplotlib"
9292
]
9393

94-
[tool.setuptools.packages.find]
95-
where = ["."]
96-
include = ["plotly*", "_plotly*"]
97-
exclude = ["__pycache__*", "tests*"]
98-
99-
[tool.setuptools.package-data]
100-
plotly = [
101-
"package_data/*",
102-
"package_data/templates/*",
103-
"package_data/datasets/*",
104-
"validators/_validators.json"
105-
]
106-
107-
[tool.jupyter-packaging.builder]
108-
factory = "jupyter_packaging.npm_builder"
109-
auto_data_files = true
110-
111-
[tool.jupyter-packaging.build-args]
112-
build_cmd = "build:prod"
113-
npm = ["jlpm"]
114-
115-
[tool.hatch.build.hooks.jupyter-builder]
116-
editable-frontend = true
117-
118-
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
119-
build_cmd = "build"
120-
npm = ["jlpm"]
121-
source_dir = "js"
122-
build_dir = "plotly/labextension"
123-
skip_symlink = true
124-
125-
[tool.setuptools.data-files]
126-
"share/jupyter/labextensions/jupyterlab-plotly" = [
127-
"plotly/labextension/package.json",
128-
"js/install.json"
94+
[tool.hatch.build]
95+
include = [
96+
"/plotly*",
97+
"/_plotly*",
98+
"js/install.json", # used by Jupyter extension
12999
]
130100

131-
"share/jupyter/labextensions/jupyterlab-plotly/static" = [
132-
"plotly/labextension/static/*.js"
133-
]
101+
[tool.hatch.build.targets.wheel.shared-data]
102+
# Specify files from this package which will be copied to the user's system on install
103+
# Left path is the path within this package
104+
# Right path is the path on the user's system
105+
"plotly/labextension" = "share/jupyter/labextensions/jupyterlab-plotly"
106+
"js/install.json" = "share/jupyter/labextensions/jupyterlab-plotly/install.json"

0 commit comments

Comments
 (0)