Skip to content

Commit 0908039

Browse files
committed
updated toml for uv vs pip
1 parent 64aec49 commit 0908039

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

{{cookiecutter.git_repo_name}}/pyproject.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "{{ cookiecutter.git_repo_name }}"
10+
{% if cookiecutter.package_manager == 'pip' %}
1011
dynamic = ["version", "readme", "dependencies"]
12+
{% elif cookiecutter.package_manager == 'uv' %}
13+
dynamic = ["version", "readme"]
14+
{% endif %}
1115
requires-python = ">={{ cookiecutter.minimum_python_version }}"
1216
description = "{{ cookiecutter.app_description }}"
1317
keywords = [
@@ -49,6 +53,31 @@ classifiers = [
4953

5054
]
5155

56+
{% if cookiecutter.package_manager == 'uv' %}
57+
dependencies = [
58+
"fastapi",
59+
"pydantic",
60+
"uvicorn",
61+
{% if cookiecutter.use_requests == 'y' %}"requests",{% endif %}
62+
{% if cookiecutter.use_cryptography == 'y' %}"cryptography",{% endif %}
63+
]
64+
65+
[dependency-groups]
66+
dev = [
67+
"black",
68+
"tomli",
69+
"pytest-cov",
70+
"sphinx",
71+
"pylint",
72+
"myst-parser",
73+
"sphinx_rtd_theme",
74+
"sphinxcontrib-mermaid",
75+
"httpx",
76+
"bandit",
77+
{% if cookiecutter.use_requests == 'y' %}"requests-mock",{% endif %}
78+
]
79+
{% endif %}
80+
5281
[project.urls]
5382
Documentation = "https://{{ cookiecutter.git_repo_name }}.readthedocs.io/en/latest/"
5483
Source = "{{ cookiecutter.git_url }}"
@@ -72,7 +101,9 @@ zip-safe = false
72101
[tool.setuptools.dynamic]
73102
version = {attr = "{{cookiecutter.__app_name}}.version.__version__"}
74103
readme = {file = "README.md", content-type = "text/markdown"}
104+
{% if cookiecutter.package_manager == 'pip' %}
75105
dependencies = {file = "requirements.txt"}
106+
{% endif %}
76107

77108
[tool.pytest.ini_options]
78109
addopts = "--strict-markers"
@@ -107,3 +138,12 @@ exclude_dirs = [
107138
"venv",
108139
"docs",
109140
]
141+
142+
{% if cookiecutter.package_manager == 'uv' %}
143+
# UV settings reference https://docs.astral.sh/uv/reference/settings/
144+
145+
[tool.uv]
146+
keyring-provider = "subprocess"
147+
native-tls = true
148+
149+
{% endif %}

0 commit comments

Comments
 (0)