File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,19 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " linktools-setup"
7- version = " 0.0.1"
87description = " linktools toolkit"
98requires-python = " >=3.6"
109authors = [{
name =
" Hu Ji" ,
email =
" [email protected] " }]
1110license = " Apache-2.0"
12- dependencies = [" pyyaml" , " jinja2" , " setuptools>=80" ]
11+ dependencies = [" pyyaml" , " jinja2" , " setuptools>=64.0.0" ]
12+ dynamic = [" version" ]
1313
1414[project .urls ]
1515Homepage = " https://github.com/linktools-toolkit/linktools-setup"
1616Repository = " 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 ]
2222where = [" src" ]
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments