diff --git a/apps/ai-starter/pyproject.toml b/apps/ai-starter/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/ai-starter/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/default/pyproject.toml b/apps/default/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/default/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/hello/pyproject.toml b/apps/hello/pyproject.toml deleted file mode 100644 index f1775894f..000000000 --- a/apps/hello/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-hello" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/pdg-tutorial/pyproject.toml b/apps/pdg-tutorial/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/pdg-tutorial/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/quickstart/pyproject.toml b/apps/quickstart/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/quickstart/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/text-demo/pyproject.toml b/apps/text-demo/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/text-demo/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/src/writer/command_line.py b/src/writer/command_line.py index 1255f5240..7aa29ddc0 100644 --- a/src/writer/command_line.py +++ b/src/writer/command_line.py @@ -3,6 +3,7 @@ import shutil import sys from typing import Optional +from writer import VERSION import click @@ -95,6 +96,11 @@ def create_app(app_path: str, template_name: Optional[str], overwrite=False): sys.exit(1) shutil.copytree(template_path, app_path, dirs_exist_ok=True) + # create/update requirements.txt and add writer to it + requirements_path = os.path.join(app_path, "requirements.txt") + with open(requirements_path, "a") as f: + f.write(f"writer=={VERSION}\n") + if __name__ == "__main__": main()