@@ -42,16 +42,32 @@ dev = [
4242 " expecttest" , # test_tokenizer
4343]
4444
45- [tool .setuptools .dynamic ]
46- version = {file = " assets/version.txt" }
45+ [tool .setuptools_scm ]
46+ # Automatically generate version from git tags and commits at BUILD TIME
47+ # Development builds: 0.2.0.post77+gf5e3a84e (77 commits after v0.2.0 tag)
48+ # Tagged releases: 0.2.0 (when building from a git tag)
49+ # To override version for releases: set SETUPTOOLS_SCM_PRETEND_VERSION=x.y.z
50+ # This writes the version to torchtitan/_version.py during wheel build
51+ version_file = " torchtitan/_version.py"
52+ version_file_template = """ \
53+ # Copyright (c) Meta Platforms, Inc. and affiliates.
54+ # All rights reserved.
55+ # This source code is licensed under the license found in the
56+ # LICENSE file in the root directory of this source tree.
57+
58+ # This file is generated by setuptools_scm at build time
59+ # DO NOT EDIT - it will be overwritten during the build process
60+ __version__ = "{version}"
61+ """
62+ tag_regex = " ^(?P<prefix>v)?(?P<version>[^\\ +]+)(?P<suffix>.*)?$"
4763
4864[tool .codespell ]
4965skip = [" *.json" ]
5066ignore-words-list = [" assertin" , " datas" ," indx" , " inpt" , " nd" , " socio-economic" ]
5167
5268# ---- Explicit project build information ---- #
5369[build-system ]
54- requires = [" setuptools>=61.0" ]
70+ requires = [" setuptools>=61.0" , " setuptools-scm>=8.0 " ]
5571build-backend = " setuptools.build_meta"
5672
5773[tool .setuptools .packages .find ]
0 commit comments