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

refactor(framework) Install FAB from wheel #4360

Closed
wants to merge 2 commits into from
Closed
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ typer = "^0.12.5"
tomli = "^2.0.1"
tomli-w = "^1.0.0"
pathspec = "^0.12.1"
hatchling = "^1.25.0"
# Optional dependencies (Simulation Engine)
ray = { version = "==2.10.0", optional = true, python = ">=3.9,<3.12" }
# Optional dependencies (REST transport layer)
Expand Down
16 changes: 15 additions & 1 deletion src/py/flwr/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,22 @@ def validate_and_install(
shutil.copy2(item, install_dir / item.name)

try:
# Build wheel
subprocess.run(
["pip", "install", "-e", install_dir, "--no-deps"],
["python", "-m", "hatchling", "build", "-d", install_dir, "-t", "wheel"],
capture_output=True,
text=True,
check=True,
)
wheel_files = list(install_dir.glob("*.whl"))
if len(wheel_files) != 1:
raise RuntimeError(
f"Exactly one wheel file was expected, but {len(wheel_files)} "
"are present."
)
# Install wheel
subprocess.run(
["pip", "install", wheel_files[0], "--no-deps"],
capture_output=True,
text=True,
check=True,
Expand Down
Loading