Skip to content

Commit 3e7be53

Browse files
Move sources to src, make package version static (#32)
1 parent a4df6c5 commit 3e7be53

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

pyproject.toml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "ypywidgets"
7-
dynamic = ["version"]
7+
version = "0.9.0"
88
description = "Y-based Jupyter widgets for Python"
99
readme = "README.md"
1010
license = "MIT"
@@ -31,15 +31,3 @@ dev = [
3131
"pytest",
3232
"pytest-asyncio",
3333
]
34-
35-
[tool.hatch.version]
36-
path = "ypywidgets/__init__.py"
37-
38-
[tool.hatch.build.targets.sdist]
39-
include = [
40-
"/ypywidgets",
41-
]
42-
43-
[tool.hatch.build.targets.wheel]
44-
ignore-vcs = true
45-
packages = ["ypywidgets"]

src/ypywidgets/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import importlib.metadata
2+
3+
from .widget import Widget as Widget
4+
from .reactive import Reactive as Reactive
5+
6+
7+
try:
8+
__version__ = importlib.metadata.version("ypywidgets")
9+
except importlib.metadata.PackageNotFoundError:
10+
__version__ = "unknown"
File renamed without changes.
File renamed without changes.
File renamed without changes.

ypywidgets/__init__.py

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

0 commit comments

Comments
 (0)