Skip to content

Commit e969a2f

Browse files
committed
Force recompilation of all dependencies
There is, in general, not a requirement that source packages compile to the same thing as available binary packages. It's rare, but this is one thing that can end up causing differences in benchmark results between two Python distributions, if one has binary packages and one does not. Forcing all dependencies to compile from source eliminates this potential difference. The only case I know of is mypy, which ships a more-optimized binary package than what their source package compiles to.
1 parent c0c384c commit e969a2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyperformance/_pip.py

+5
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ def install_requirements(reqs, *extra,
153153
if os.path.exists(reqs):
154154
args.append('-r') # --requirement
155155
args.append(reqs)
156+
157+
if "USE_BINARY_PACKAGES" not in os.environ:
158+
# Force recompilation:
159+
args.extend(["--no-binary", ":all:"])
160+
156161
return run_pip('install', *args, **kwargs)
157162

158163

0 commit comments

Comments
 (0)