Create a skeleton python project and modify it to fit this project
Create a skeleton python project using "hatch new -i --cli infra-rebuild" with Hatch version 1.7.0 and modify it to fit this project. This is the first step of porting infra-rebuild to Python. Also provide a first .gitignore ignoring relevant build directories.
This commit is contained in:
parent
d085cfd3b9
commit
500438636a
7 changed files with 181 additions and 0 deletions
1
src/infra_rebuild/__about__.py
Normal file
1
src/infra_rebuild/__about__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__version__ = "0.0.1"
|
0
src/infra_rebuild/__init__.py
Normal file
0
src/infra_rebuild/__init__.py
Normal file
6
src/infra_rebuild/__main__.py
Normal file
6
src/infra_rebuild/__main__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
from infra_rebuild.cli import infra_rebuild
|
||||
|
||||
sys.exit(infra_rebuild())
|
9
src/infra_rebuild/cli/__init__.py
Normal file
9
src/infra_rebuild/cli/__init__.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import click
|
||||
|
||||
from infra_rebuild.__about__ import __version__
|
||||
|
||||
|
||||
@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True)
|
||||
@click.version_option(version=__version__, prog_name="infra-rebuild")
|
||||
def infra_rebuild():
|
||||
click.echo("Hello world!")
|
Loading…
Add table
Add a link
Reference in a new issue