Skip to content

Commit e2f2d2b

Browse files
author
Hu Ji
committed
update version
1 parent a5d8d0d commit e2f2d2b

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "linktools-setup"
7-
version = "0.0.1"
87
description = "linktools toolkit"
98
requires-python = ">=3.6"
109
authors = [{name = "Hu Ji", email = "[email protected]"}]
1110
license = "Apache-2.0"
12-
dependencies = ["pyyaml", "jinja2", "setuptools>=80"]
11+
dependencies = ["pyyaml", "jinja2", "setuptools>=64.0.0"]
12+
dynamic = ["version"]
1313

1414
[project.urls]
1515
Homepage = "https://github.com/linktools-toolkit/linktools-setup"
1616
Repository = "https://github.com/linktools-toolkit/linktools-setup.git"
1717

1818
[project.entry-points."setuptools.finalize_distribution_options"]
19-
linktools_setup = "linktools_setup.setuptools:setup"
19+
linktools_setup = "linktools_setup.setuptools:finalize_distribution_options"
2020

2121
[tool.setuptools.packages.find]
2222
where = ["src"]

setup.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
import os
4+
5+
from setuptools import setup
6+
7+
if __name__ == '__main__':
8+
version = os.environ.get("VERSION", None)
9+
if not version:
10+
version = "0.0.1"
11+
if version.startswith("v"):
12+
version = version[len("v"):]
13+
14+
setup(version=version)

src/linktools_setup/setuptools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,6 @@ def convert_files(self):
182182
}, fd_out)
183183

184184

185-
def setup(dist: setuptools.Distribution) -> None:
185+
def finalize_distribution_options(dist: setuptools.Distribution) -> None:
186186
context = SetupContext(dist)
187187
context.convert_files()

0 commit comments

Comments
 (0)