Skip to content

Commit b1ab7f9

Browse files
committed
Hardcode version in __init__.py and set it dynamically in pyproject.toml
1 parent 859583b commit b1ab7f9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

clients/aws-sdk/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aws-sdk"
3-
version = "0.0.1"
3+
dynamic = ["version"]
44
description = "Meta-package containing all AWS service clients."
55
readme = "README.md"
66
requires-python = ">=3.12"
@@ -30,5 +30,8 @@ all = [
3030
requires = ["hatchling"]
3131
build-backend = "hatchling.build"
3232

33+
[tool.hatch.version]
34+
path = "src/aws_sdk/__init__.py"
35+
3336
[tool.ruff]
3437
src = ["src"]
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
import importlib.metadata
3+
__version__ = "0.0.1"
44

5-
__version__: str = importlib.metadata.version(__name__)
65

76
# TODO: Consider adding relative imports for services from the top level namespace?

0 commit comments

Comments
 (0)