Skip to content

Commit

Permalink
🐛 fix backward compatibility with non-uv packages
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Aug 17, 2024
1 parent c548e87 commit e343072
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,19 @@ replace_ruff_target_version = run_command(
check: true,
).stdout()
run_command(python, ['-c', replace_ruff_target_version], check: true)
find_program(get_option('install-requirements-command')[0], 'pip', required: false, disabler: true)
pip = get_option('install-requirements-command')
install_cmd = find_program(get_option('install-requirements-command')[0], required: false, disabler: true)
if install_cmd.found()
pip = get_option('install-requirements-command')
else
pip = find_program('pip', required: true)
endif
pipx = find_program('pipx', required: true, disabler: true)
find_program(get_option('compile-requirements-command')[0], 'pip-compile', required: false)
pip_compile = get_option('compile-requirements-command')
compile_cmd = find_program(get_option('compile-requirements-command')[0], required: false, disabler: true)
if compile_cmd.found()
pip_compile = get_option('compile-requirements-command')
else
pip_compile = find_program('pip-compile', required: true).full_path()
endif
if not meson.is_subproject()
custom_target(
'requirements.txt',
Expand Down
2 changes: 1 addition & 1 deletion ozi/dist/sigstore/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
requirements = ['requirements.in']
extra_args = []
if get_option('compile-requirements-command')[0] == 'uv'
if pip_compile[0].endswith('uv')
extra_args = ['--prerelease=allow']
endif
configure_file(
Expand Down

0 comments on commit e343072

Please sign in to comment.