From b4aa5971e6068db79f5a11852f0cbeea889896cd Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Sun, 23 Feb 2025 11:04:05 -0500 Subject: [PATCH] Add some options --- copier.yml | 23 +++++++++++++++++++++++ pyproject.toml.jinja | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/copier.yml b/copier.yml index 8949d8f..766a47f 100644 --- a/copier.yml +++ b/copier.yml @@ -6,6 +6,7 @@ project_name: project_description: type: str help: Describe your project + default: A project based on ajal-template-python minimum_python_version: type: str @@ -15,3 +16,25 @@ minimum_python_version: - "3.11" - "3.12" - "3.13" + +dependency_manager: + type: str + help: Python dependency manager + choices: + - uv + - poetry + - hatch + - setuptools + - flit + - pdm + default: uv + +author_name: + type: str + help: Author name + default: "" + +author_email: + type: str + help: Author email + default: "" diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index edba05d..1c958b0 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -2,6 +2,29 @@ name = "{{project_name}}" version = "0.1.0" description = "{{project_description}}" +authors = [ + {name = "{{author_name}}", email = "{{author_email}}"} +] readme = "README.md" requires-python = ">={{minimum_python_version}}" dependencies = [] + +[build-system] +{%- if dependency_manager == "poetry" %} +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" +{%- elif dependency_manager == "setuptools" %} +{%- elif dependency_manager == "hatch" %} +requires = ["hatchling"] +build-backend = "hatchling.build" +{%- elif dependency_manager == "flit" %} +requires = ["flit_core >= 3.4"] +build-backend = "flit_core.buildapi" +{%- elif dependency_manager == "pdm" %} +requires = ["pdm-backend"] +build-backend = "pdm.backend" +{%- else %} +{#- This is the default #} +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" +{%- endif %}