From 4996afb012ef1f05e56e576bb472df9217b00a6b Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 12 Dec 2022 13:12:18 +0530 Subject: [PATCH] fix: install wheel in venv closes https://github.com/frappe/frappe/issues/18718 --- bench/bench.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bench/bench.py b/bench/bench.py index e799838a..f58ddfd7 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -361,6 +361,7 @@ class BenchSetup(Base): self.run(f"{venv} env", cwd=self.bench.name) self.pip() + self.wheel() if os.path.exists(frappe): self.run( @@ -398,6 +399,19 @@ class BenchSetup(Base): 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