Skip to content

Commit

Permalink
🔧 add install options for each checkpoint command.
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed May 26, 2024
1 parent 5e5dfe3 commit 223ad2f
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 48 deletions.
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ foreach name : namespace
suite.enable_auto_if(dev.enabled())
set_variable(name, suite)
foreach command : command_names
if suite.enabled()
message('installing', command)
endif
if suite.enabled() and command in module_only
modules += [command.underscorify()] # we should collapse repeated `_`
endif
Expand All @@ -242,23 +239,27 @@ foreach name : namespace
and command not in plugin_only
)
if command not in module_only and get_option('tox-env-dir') != ''
message('install', command, 'with pipx')
run_command(
pipx,
[
'runpip',
'meson',
'--python', python,
'install',
get_option('install-args-'+command),
'-r',
meson.project_build_root() / 'ozi' / name / command / 'requirements.txt',
],
check: true
)
else
message('install', command, 'with pip')
run_command(
pip,
[
'install',
get_option('install-args-'+command),
'-r',
meson.project_build_root() / 'ozi' / name / command / 'requirements.txt',
],
Expand Down
154 changes: 109 additions & 45 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ option(
'docs-suite',
type: 'array',
description: '--setup=docs',
value: [
'doc8',
'pydocstyle',
'sphinx-build',
'sphinxawesome-codelinter',
'sphinxawesome-theme',
],
value: [],
)
option(
'lint-suite',
Expand Down Expand Up @@ -181,11 +175,7 @@ option(
'flake8-comprehensions',
],
)
option(
'tox-env-dir',
type: 'string',
value: ''
)
option('tox-env-dir', type: 'string', value: '')
option(
'module-only',
type: 'array',
Expand All @@ -198,43 +188,46 @@ option(
'readme-renderer',
],
)
# test application arguments
# utility application arguments
option('args-sigstore', type: 'array', value: ['--version'], yield: true)
option('install-args-sigstore', type: 'array', value: [], yield: true)
option(
'args-semantic_release',
type: 'array',
value: ['version', '--print'],
yield: true,
)

option('install-args-semantic_release', type: 'array', value: [], yield: true)
option('args-mypy', type: 'array', value: ['@build_root@'], yield: true)
option(
'args-doc8',
'install-args-mypy',
description: 'pipx install args',
type: 'array',
value: ['--config', 'pyproject.toml', '@docs_source@'],
value: [],
yield: true,
)

option(
'args-pydocstyle',
'args-bandit',
description: 'application args',
type: 'array',
value: ['-v', '-d', '--config=pyproject.toml', '@docs_source@'],
yield: true,
value: [
'--configfile',
'pyproject.toml',
'--ignore-nosec',
'-r',
'@build_root@',
],
)

option('args-sphinx-build', type: 'array', value: ['--version'], yield: true)
option('args-mypy', type: 'array', value: ['@build_root@'])
option(
'args-bandit',
description: 'application',
type: 'array',
value: [
'--configfile', 'pyproject.toml',
'--ignore-nosec',
'-r', '@build_root@'
]
option(
'install-args-bandit',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-black',
description: 'application args',
type: 'array',
value: [
'-S',
Expand All @@ -246,8 +239,16 @@ option(
],
yield: true,
)
option(
'install-args-black',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-isort',
description: 'application args',
type: 'array',
value: [
'-c',
Expand All @@ -259,25 +260,74 @@ option(
],
yield: true,
)
option('args-pylint', type: 'array', value: ['@project_name@'], yield: true)
option(
'args-pyright',
type: 'array',
value: [
'--stats',
'--warnings',
'--verbose',
'@build_root@',
],
yield: true
option(
'install-args-isort',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-pylint',
description: 'application args',
type: 'array',
value: ['@project_name@'],
yield: true,
)
option(
'install-args-pylint',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-pyright',
description: 'application args',
type: 'array',
value: [
'--stats',
'--warnings',
'--verbose',
'@build_root@',
],
yield: true,
)
option(
'install-args-pyright',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-coverage',
description: 'application args',
type: 'array',
value: ['debug', 'config'],
yield: true,
)
option(
'install-args-coverage',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option('args-coverage', type: 'array', value: ['debug', 'config'], yield: true)
option(
'args-readme-renderer',
description: 'module args',
type: 'array',
value: ['README.rst'],
yield: true,
)
option(
'install-args-readme-renderer',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option(
'args-flake8',
type: 'array',
Expand All @@ -292,6 +342,13 @@ option(
],
yield: true,
)
option(
'install-args-flake8',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)
option('args-Flake8-pyproject', type: 'array', value: [], yield: true)
option(
'args-pytest',
Expand All @@ -304,7 +361,14 @@ option(
'auto',
'-d',
'--exitfirst',
'--cov-config=pyproject.toml'
'--cov-config=pyproject.toml',
],
yield: true,
)
option(
'install-args-pytest',
description: 'pipx install args',
type: 'array',
value: [],
yield: true,
)

0 comments on commit 223ad2f

Please sign in to comment.