Skip to content

Commit

Permalink
fix: install wheel in venv
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Dec 12, 2022
1 parent ca25450 commit 4996afb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def env(self, python="python3"):
self.run(f"{venv} env", cwd=self.bench.name)

self.pip()
self.wheel()

if os.path.exists(frappe):
self.run(
Expand Down Expand Up @@ -398,6 +399,19 @@ def pip(self, verbose=False):
f"{self.bench.python} -m pip install {quiet_flag} --upgrade pip", cwd=self.bench.name
)

@step(title="Installing wheel", success="Installed wheel")
def wheel(self, verbose=False):
"""Wheel is required for building old setup.py packages.
ref: https://github.com/pypa/pip/issues/8559"""
import bench.cli

verbose = bench.cli.verbose or verbose
quiet_flag = "" if verbose else "--quiet"

return self.run(
f"{self.bench.python} -m pip install {quiet_flag} wheel", cwd=self.bench.name
)

def logging(self):
from bench.utils import setup_logging

Expand Down

0 comments on commit 4996afb

Please sign in to comment.