Skip to content

Commit

Permalink
Add pyproject.toml instead of setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 28, 2023
1 parent 4fc2d4a commit cf975d8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ dependency_installation_mode:
help: Choose how to install module dependencies.
when: *ci_is_travis

use_pyproject_toml:
default: no
type: bool
help:
Use pyproject.toml instead of setup.py.

generate_requirements_txt:
default: yes
type: bool
Expand Down
16 changes: 13 additions & 3 deletions src/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{%- set repo_rev.flake8 = "3.8.3" %}
{%- set repo_rev.flake8_bugbear = "20.1.4" %}
{%- set repo_rev.isort = "5.12.0" %}
{%- set repo_rev.maintainer_tools = "969238e47c07d0c40573acff81d170f63245d738" %}
{%- set repo_rev.maintainer_tools = "568cacd1d6eef453063a524a5ce63dcd49c7259b" %}
{%- set repo_rev.nodejs = "14.13.0" %}
{%- set repo_rev.odoo_pre_commit_hooks = "v0.0.25" %}
{%- set repo_rev.pre_commit_hooks = "v3.2.0" %}
Expand All @@ -26,7 +26,7 @@
{%- set repo_rev.flake8 = "3.9.2" %}
{%- set repo_rev.flake8_bugbear = "21.9.2" %}
{%- set repo_rev.isort = "5.12.0" %}
{%- set repo_rev.maintainer_tools = "969238e47c07d0c40573acff81d170f63245d738" %}
{%- set repo_rev.maintainer_tools = "568cacd1d6eef453063a524a5ce63dcd49c7259b" %}
{%- set repo_rev.nodejs = "14.18.0" %}
{%- set repo_rev.odoo_pre_commit_hooks = "v0.0.25" %}
{%- set repo_rev.pre_commit_hooks = "v4.0.1" %}
Expand All @@ -43,7 +43,7 @@
{%- set repo_rev.flake8 = "3.9.2" %}
{%- set repo_rev.flake8_bugbear = "21.9.2" %}
{%- set repo_rev.isort = "5.12.0" %}
{%- set repo_rev.maintainer_tools = "969238e47c07d0c40573acff81d170f63245d738" %}
{%- set repo_rev.maintainer_tools = "568cacd1d6eef453063a524a5ce63dcd49c7259b" %}
{%- set repo_rev.nodejs = "16.17.0" %}
{%- set repo_rev.odoo_pre_commit_hooks = "v0.0.25" %}
{%- set repo_rev.pre_commit_hooks = "v4.3.0" %}
Expand Down Expand Up @@ -113,6 +113,9 @@ repos:
- --org-name={{ org_slug }}
- --repo-name={{ repo_slug }}
- --if-source-changed
{%- if use_pyproject_toml and generate_requirements_txt %}
- id: oca-gen-external-dependencies
{%- endif %}
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: {{ repo_rev.odoo_pre_commit_hooks }}
hooks:
Expand Down Expand Up @@ -187,6 +190,12 @@ repos:
args:
- --settings=.
exclude: /__init__\.py$
{%- if use_pyproject_toml %}
- repo: https://github.com/sbidoul/whool
rev: v0.4
hooks:
- id: whool-init
{%- else %}
- repo: https://github.com/acsone/setuptools-odoo
rev: {{ repo_rev.setuptools_odoo }}
hooks:
Expand All @@ -199,6 +208,7 @@ repos:
- --header
- "# generated from manifests external_dependencies"
{%- endif %}
{%- endif %}
- repo: https://github.com/PyCQA/flake8
rev: {{ repo_rev.flake8 }}
hooks:
Expand Down

0 comments on commit cf975d8

Please sign in to comment.