Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define version in pyproject.toml instead of source code #1

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions marimo_labs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
__version__ = "0.1.0"

__all__ = ["huggingface"]
import importlib.metadata
import warnings

import marimo_labs.huggingface as huggingface

try:
__version__ = importlib.metadata.version(__name__)
except importlib.metadata.PackageNotFoundError as e:
warnings.warn(f"Could not determine version of {__name__}\n{e!r}", stacklevel=2)
__version__ = "unknown"

__all__ = ["huggingface"]
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "marimo_labs"
description = "Cutting-edge experimental features for marimo"
dynamic = ["version"]
version = "0.1.0"
dependencies = [
"marimo>=0.3.8",
"huggingface_hub>=0.19.3",
Expand Down Expand Up @@ -46,9 +46,6 @@ dev = [
"pytest~=8.1.1",
]

[tool.setuptools.dynamic]
version = { attr = "marimo_labs.__version__" }

[tool.setuptools.packages.find]
# project source is entirely contained in the `marimo` package
include = ["marimo_labs*"]
Expand Down
Loading