From 1278009ff7d796ec8aee0b63c67a0c316fa09bd7 Mon Sep 17 00:00:00 2001 From: Archie Hilton Date: Sun, 29 Sep 2024 22:14:10 +0100 Subject: [PATCH] build: Add build system With the hopes of this doing more intelligent stuff like making pull requests, interfacing with git and setting up builds, it's worth getting this set up first. --- .gitignore | 3 +++ mkr/__init__.py | 0 mkr/__main__.py | 5 +++++ release.py => mkr/mkr.py | 2 +- pyproject.toml | 17 +++++++++++++++++ 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 mkr/__init__.py create mode 100644 mkr/__main__.py rename release.py => mkr/mkr.py (99%) create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index 46f2e7d..54d5cd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ Releases build changelogs +*.egg-info +.venv +__pycache__ diff --git a/mkr/__init__.py b/mkr/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mkr/__main__.py b/mkr/__main__.py new file mode 100644 index 0000000..97a2eef --- /dev/null +++ b/mkr/__main__.py @@ -0,0 +1,5 @@ +from mkr.mkr import run_cli + +run_cli() + +print("Hello, world!") diff --git a/release.py b/mkr/mkr.py similarity index 99% rename from release.py rename to mkr/mkr.py index dce50a7..e62a35a 100644 --- a/release.py +++ b/mkr/mkr.py @@ -76,7 +76,7 @@ def do_checklists(config): completed_checklists.append((i, checklist["checklist_name"])) -if __name__ == "__main__": +def run_cli(): args = parser.parse_args() if not args.verbose: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..341100b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "mkr" +version = "0.1.0" +authors = [ + {name = "Archie Hilton", email = "archie@sabretechnology.co.uk"}, +] +description = "Quickly package releases" +readme = "README.md" +requires-python = ">=3.11" +license = {text = "All Rights Reserved."} + +[project.scripts] +mkr = "mkr.mkr:run_cli"