diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dfd1ba4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.venv/ +__pycache__/ +*.py[cod] +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +dist/ +*.egg-info/ diff --git a/README.md b/README.md index 6e66c41..f0bb56b 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,29 @@ Composable scaffolding CLI for production-ready Python apps. > **Status:** bootstrapping. Roadmap: [#1](https://github.com/Create-Python-App/create-python-app/issues/1). + +## Monorepo layout (uv workspaces) + +This repository is a **virtual uv workspace**: the root is not published; packages live under `packages/*` and share one `uv.lock` / `.venv`. + +```text +create-python-app/ # virtual workspace root (no [project] table) +├── pyproject.toml # [tool.uv.workspace] members = ["packages/*"] +├── uv.lock +├── .venv/ # shared environment (gitignored later) +└── packages/ + ├── create-python-app-core/ # scaffolding engine + └── create-awesome-python-app/ # CLI (depends on core via workspace) +``` + +### Setup + +```bash +# Requires uv: https://docs.astral.sh/uv/ +uv sync +``` + +### Reference + +- [uv workspaces handbook](https://pydevtools.com/handbook/how-to/how-to-set-up-a-python-monorepo-with-uv-workspaces/) +- Node parity: [Create-Node-App/create-node-app](https://github.com/Create-Node-App/create-node-app) diff --git a/packages/create-awesome-python-app/pyproject.toml b/packages/create-awesome-python-app/pyproject.toml new file mode 100644 index 0000000..fea79df --- /dev/null +++ b/packages/create-awesome-python-app/pyproject.toml @@ -0,0 +1,18 @@ +[project] +name = "create-awesome-python-app" +version = "0.0.0" +description = "Composable scaffolding CLI for production-ready Python apps (stub)" +requires-python = ">=3.12" +dependencies = [ + "create-python-app-core", +] + +[tool.uv.sources] +create-python-app-core = { workspace = true } + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/create_awesome_python_app"] diff --git a/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py b/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py new file mode 100644 index 0000000..3bb77b5 --- /dev/null +++ b/packages/create-awesome-python-app/src/create_awesome_python_app/__init__.py @@ -0,0 +1,3 @@ +"""Create Awesome Python App CLI.""" + +__version__ = "0.0.0" diff --git a/packages/create-python-app-core/pyproject.toml b/packages/create-python-app-core/pyproject.toml new file mode 100644 index 0000000..7972ad0 --- /dev/null +++ b/packages/create-python-app-core/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "create-python-app-core" +version = "0.0.0" +description = "Scaffolding engine for Create Awesome Python App (stub)" +requires-python = ">=3.12" +dependencies = [] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/create_python_app_core"] diff --git a/packages/create-python-app-core/src/create_python_app_core/__init__.py b/packages/create-python-app-core/src/create_python_app_core/__init__.py new file mode 100644 index 0000000..bbb407c --- /dev/null +++ b/packages/create-python-app-core/src/create_python_app_core/__init__.py @@ -0,0 +1,3 @@ +"""Scaffolding engine for Create Awesome Python App.""" + +__version__ = "0.0.0" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9687bf6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +# Virtual workspace root — not a publishable package. +# See: https://pydevtools.com/handbook/how-to/how-to-set-up-a-python-monorepo-with-uv-workspaces/ + +[tool.uv.workspace] +members = ["packages/*"] diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..66c95fc --- /dev/null +++ b/uv.lock @@ -0,0 +1,25 @@ +version = 1 +revision = 3 +requires-python = ">=3.12" + +[manifest] +members = [ + "create-awesome-python-app", + "create-python-app-core", +] + +[[package]] +name = "create-awesome-python-app" +version = "0.0.0" +source = { editable = "packages/create-awesome-python-app" } +dependencies = [ + { name = "create-python-app-core" }, +] + +[package.metadata] +requires-dist = [{ name = "create-python-app-core", editable = "packages/create-python-app-core" }] + +[[package]] +name = "create-python-app-core" +version = "0.0.0" +source = { editable = "packages/create-python-app-core" }