8000 Proposal: Force recompilation of all dependencies by kmod · Pull Request #195 · python/pyperformance · GitHub
[go: up one dir, main page]

Skip to content

Proposal: Force recompilation of all dependencies #195

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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.
  • Loading branch information
kmod committed May 10, 2022
commit e969a2f69f3b433233155aaaf3f094a8bde205b5
5 changes: 5 additions & 0 deletions pyperformance/_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ def install_requirements(reqs, *extra,
if os.path.exists(reqs):
args.append('-r') # --requirement
args.append(reqs)

if "USE_BINARY_PACKAGES" not in os.environ:
# Force recompilation:
args.extend(["--no-binary", ":all:"])

return run_pip('install', *args, **kwargs)


Expand Down
0