Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updating poetry.lock before local wheels are used in solution template #495

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/495.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: updating poetry.lock before local wheels are used in solution template
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,23 @@ def clear_workspace(args: object) -> None:
print()


def update_lock_file_to_consider_local_wheels(args: object) -> None:
"""Specify in the poetry.lock file that some packages come from a local wheel file."""
if not args.local_wheels:
return

print("Adapting lock file to consider local wheels.")
subprocess.run(
[
DEPENDENCY_MANAGER_PATHS[sys.platform]["build_sys_exec"],
"lock",
"--no-update",
],
check=True,
shell=DEPENDENCY_MANAGER_PATHS[sys.platform]["shell"],
)


def install_production_dependencies(args: object) -> None:
"""Install the package (mandatory requirements only)."""
print("Install production dependencies")
Expand Down Expand Up @@ -1027,6 +1044,8 @@ def main() -> None:

print_section_header("Install dependencies", max_length=100)

update_lock_file_to_consider_local_wheels(args)

install_production_dependencies(args)

install_optional_dependencies(args)
Expand Down
Loading