forked from NVIDIA/NeMo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use setuptools_scm to auto-generate version (NVIDIA#737)
* Use setuptools_scm to auto-generate version [setuptools_scm](https://github.com/pypa/setuptools_scm) is the de-facto standard to automate the version information of a Python project. It uses information from version control system like git to generate [PEP 440](https://peps.python.org/pep-0440/) version identifiers. The version number is generated on build time and included in source dist and Python wheels. It works with `pip install` from a local checkout or git checkout URL. For git repositories, the version from the last git tag in the history. If the current checkout is not in tag, setuptools_scm includes git tag revision and count since last tag in the version. This information is useful to debug development checkouts. Example: `cli-0.10.2.dev4+g724d895` means four commits (`dev4`) after release tag `v0.10.1` (sic!). The change also fixes a problem with PR NVIDIA#727. It added dynamic version without actually making the version dynamic. Also run tests whenever `pyproject.toml` or requirements are modified. Resolves: NVIDIA#268 Resolves: NVIDIA#736 Signed-off-by: Christian Heimes <[email protected]> Signed-off-by: Mark Sturdevant <[email protected]>
- Loading branch information
Showing
5 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "cli" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="TBD", email="[email protected]" }, | ||
] | ||
|
@@ -15,15 +18,17 @@ classifiers = [ | |
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dynamic = ["dependencies"] | ||
dynamic = ["dependencies", "version"] | ||
|
||
[tool.setuptools_scm] | ||
version_file = "cli/_version.py" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/instruct-lab/cli" | ||
Issues = "https://github.com/instruct-lab/cli/issues" | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
version = {attr = "cli.__version__"} | ||
|
||
[project.scripts] | ||
# defines lab executable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters