Skip to content

Commit 5b210de

Browse files
committed
switch to uv/hatch
1 parent eb7aeac commit 5b210de

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

.readthedocs.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-22.04
10+
os: ubuntu-lts-latest
1111
tools:
12-
python: "3.11"
12+
python: "3"
13+
jobs:
14+
pre_create_environment:
15+
- asdf plugin add uv
16+
- asdf install uv latest
17+
- asdf global uv latest
18+
create_environment:
19+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
20+
install:
21+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs
1322

1423
mkdocs:
1524
configuration: mkdocs.yml
16-
17-
# Optionally set the version of Python and requirements required to build your docs
18-
python:
19-
install:
20-
- method: pip
21-
path: .
22-
extra_requirements:
23-
- docs

pyproject.toml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools>=68", "setuptools_scm[toml]>=7.1"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "python-openhab"
@@ -59,16 +59,23 @@ test = [
5959
"beautifulsoup4",
6060
]
6161

62-
[tool.setuptools_scm]
62+
[tool.hatch.envs.default]
63+
installer = "uv"
6364

64-
[tool.setuptools]
65-
include-package-data = true
65+
[tool.hatch.build.targets.wheel]
66+
packages = [
67+
"/openhab",
68+
]
6669

67-
[tool.setuptools.packages]
68-
find = { namespaces = false }
70+
[tool.hatch.build.targets.sdist]
71+
include = [
72+
"/openhab",
73+
"/tests",
74+
]
75+
exclude = []
6976

70-
[tool.setuptools.package-data]
71-
openhab = ["py.typed"]
77+
[tool.hatch.version]
78+
source = "vcs"
7279

7380
[tool.mypy]
7481
show_error_context = true

0 commit comments

Comments
 (0)