renamed to chipnut
This commit is contained in:
parent
120647f7ec
commit
c2b842c475
@ -1,7 +1,7 @@
|
|||||||
include setup.py
|
include setup.py
|
||||||
include README.md
|
include README.md
|
||||||
|
|
||||||
recursive-include nut/templates *
|
recursive-include chipnut/templates *
|
||||||
|
|
||||||
global-exclude __pycache__/
|
global-exclude __pycache__/
|
||||||
global-exclude *.py[cod]
|
global-exclude *.py[cod]
|
||||||
|
|||||||
@ -2,12 +2,12 @@ from .cli import CLI
|
|||||||
|
|
||||||
from .config import ConfigError, load_config
|
from .config import ConfigError, load_config
|
||||||
|
|
||||||
from .commands.setup import is_nut_workspace, find_template_conflicts, copy_template_files
|
from .commands.setup import is_chipnut_workspace, find_template_conflicts, copy_template_files
|
||||||
from .commands.compiler import compile as compile_project
|
from .commands.compiler import compile as compile_project
|
||||||
|
|
||||||
def help_text():
|
def help_text():
|
||||||
return [
|
return [
|
||||||
"%bold%%cyan%nut CLI: tiny shell, big squirrel energy :3%reset%",
|
"%bold%%cyan%chipnut CLI: tiny shell, big squirrel energy :3%reset%",
|
||||||
]
|
]
|
||||||
|
|
||||||
def main() -> int:
|
def main() -> int:
|
||||||
@ -15,9 +15,9 @@ def main() -> int:
|
|||||||
|
|
||||||
cli.command(
|
cli.command(
|
||||||
"init",
|
"init",
|
||||||
help="Create an empty nut workspace or reinitialize with --force",
|
help="Create an empty chipnut workspace or reinitialize with --force",
|
||||||
description=(
|
description=(
|
||||||
"Initialize a nut development workspace by creating a Nutfile and default project files. "
|
"Initialize a chipnut development workspace by creating a Nutfile and default project files. "
|
||||||
"If a Nutfile already exists, initialization should fail unless --force is used."
|
"If a Nutfile already exists, initialization should fail unless --force is used."
|
||||||
),
|
),
|
||||||
).flag(
|
).flag(
|
||||||
@ -61,8 +61,8 @@ def cmd_build(args, flags) -> int:
|
|||||||
build_folder_override = flags["build_folder"]
|
build_folder_override = flags["build_folder"]
|
||||||
file_name_override = flags["name"]
|
file_name_override = flags["name"]
|
||||||
|
|
||||||
if config_path == "Nutfile" and not is_nut_workspace():
|
if config_path == "Nutfile" and not is_chipnut_workspace():
|
||||||
print("Error: No Nutfile found. Please run 'nut init' to create a workspace.")
|
print("Error: No Nutfile found. Please run 'chipnut init' to create a workspace.")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -117,7 +117,7 @@ class _CommandSpec:
|
|||||||
class CLI:
|
class CLI:
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
prog: str = "nut",
|
prog: str = "chipnut",
|
||||||
help_callback: Optional[Callable[[], Iterable[str]]] = None,
|
help_callback: Optional[Callable[[], Iterable[str]]] = None,
|
||||||
):
|
):
|
||||||
self.prog = prog
|
self.prog = prog
|
||||||
@ -4,10 +4,10 @@ from typing import Optional
|
|||||||
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from nut.config import Config
|
from ..config import Config
|
||||||
from nut.paths import get_templates_path
|
from ..paths import get_templates_path
|
||||||
from nut.utils import zip_dir
|
from ..utils import zip_dir
|
||||||
from nut.logger import logger
|
from ..logger import logger
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class CompileContext:
|
class CompileContext:
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from nut.paths import get_templates_path
|
from ..paths import get_templates_path
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -43,5 +43,5 @@ def copy_template_files(dest_dir: str, force: bool = False, checked: bool = Fals
|
|||||||
dirs_exist_ok=True
|
dirs_exist_ok=True
|
||||||
)
|
)
|
||||||
|
|
||||||
def is_nut_workspace(path: str = ".") -> bool:
|
def is_chipnut_workspace(path: str = ".") -> bool:
|
||||||
return os.path.isfile(os.path.join(path, "Nutfile"))
|
return os.path.isfile(os.path.join(path, "Nutfile"))
|
||||||
4
setup.py
4
setup.py
@ -1,9 +1,9 @@
|
|||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="nut",
|
name="chipnut",
|
||||||
version="0.1.0",
|
version="0.1.0",
|
||||||
description="Core package and CLI entrypoint for nut",
|
description="Core package and CLI entrypoint for chipnut",
|
||||||
author="Chipperfluff",
|
author="Chipperfluff",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user