Skip to content

Commit

Permalink
package_manager=none
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Nov 14, 2023
1 parent a9d7d13 commit 681174c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/demo_auction/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COMPOSE=deploy/compose.yaml
help: ## Show this help (default)
@grep -Fh "##" $(MAKEFILE_LIST) | grep -Fv grep -F | sed -e 's/\\$$//' | sed -e 's/##//'

all: ## Run a whole CI pipeline: formatters, linters and tests
all: ## Run an entire CI pipeline: formatters, linters and tests
make format lint

format: ## Format with all tools
Expand Down
15 changes: 15 additions & 0 deletions src/dipdup/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,21 @@ def answers_from_terminal() -> Answers:

big_yellow_echo('Miscellaneous tunables; leave default values if unsure')

_, answers['package_manager'] = prompt_anyof(
question='Choose package manager',
options=(
'pdm',
'poetry',
'none',
),
comments=(
'PDM',
'Poetry',
'[none]',
),
default=0,
)

answers['line_length'] = survey.routines.input(
'Enter maximum line length for linters: ',
value=answers['line_length'],
Expand Down
16 changes: 15 additions & 1 deletion src/dipdup/projects/base/pyproject.toml.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Generated by DipDup {{ __version__ }}
{%- if project.package_manager == 'pdm' %}
{%- if project.package_manager == 'none' %}
[project]
name = "{{ project.package }}"
version = "{{ project.version }}"
description = "{{ project.description }}"
license = { text = "{{ project.license }}" }
authors = [
{ name = "{{ project.name }}", email = "{{ project.email }}" },
]
readme = "README.md"
requires-python = ">=3.11,<3.12"
dependencies = [
"dipdup>={{ project.dipdup_version }},<{{ project.dipdup_version | int + 1 }}",
]
{%- elif project.package_manager == 'pdm' %}
[project]
name = "{{ project.package }}"
version = "{{ project.version }}"
Expand Down

0 comments on commit 681174c

Please sign in to comment.