Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python-project-template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ dev = [
{%- endif %}
]

{%- if contains_code %}
# Command-line scripts that can be run after installing the package
[project.scripts]
{{package_name}}_version = "{{package_name}}_cli.{{package_name}}_version:main"
{%- endif %}

[build-system]
requires = [
"setuptools>=62", # Used to build and package the Python project
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Display basic version information to standard out."""

from {{package_name}}._version import __version__


def main():
"""The main function for the example file."""
print(f"{{package_name}}: {__version__}")


if __name__ == "__main__":
main()
Loading