mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
feat(fbcode_builder): Enable python pex
archives to allow native library dependencies
Summary: Fixes integration test failure due to lack of a functioning python-psutil (on Linux, this requires the inclusion of native code which is not permitted in a zipapp). X-link: https://github.com/facebook/sapling/pull/1100 Reviewed By: zzl0 Differential Revision: D77674102 Pulled By: quark-zju fbshipit-source-id: 11ac197d8c4082eaf16e0e28bc1a45c67f7dbb07
This commit is contained in:
committed by
Facebook GitHub Bot
parent
007a0cb3f4
commit
4f0db407cf
@@ -432,29 +432,35 @@ class InstallSysDepsCmd(ProjectCmdBase):
|
||||
merged += v
|
||||
all_packages[k] = merged
|
||||
|
||||
cmd_args = None
|
||||
cmd_argss = []
|
||||
if manager == "rpm":
|
||||
packages = sorted(set(all_packages["rpm"]))
|
||||
if packages:
|
||||
cmd_args = ["sudo", "dnf", "install", "-y", "--skip-broken"] + packages
|
||||
cmd_argss.append(
|
||||
["sudo", "dnf", "install", "-y", "--skip-broken"] + packages
|
||||
)
|
||||
elif manager == "deb":
|
||||
packages = sorted(set(all_packages["deb"]))
|
||||
if packages:
|
||||
cmd_args = [
|
||||
"sudo",
|
||||
"--preserve-env=http_proxy",
|
||||
"apt-get",
|
||||
"install",
|
||||
"-y",
|
||||
] + packages
|
||||
cmd_argss.append(
|
||||
[
|
||||
"sudo",
|
||||
"--preserve-env=http_proxy",
|
||||
"apt-get",
|
||||
"install",
|
||||
"-y",
|
||||
]
|
||||
+ packages
|
||||
)
|
||||
cmd_argss.append(["pip", "install", "pex"])
|
||||
elif manager == "homebrew":
|
||||
packages = sorted(set(all_packages["homebrew"]))
|
||||
if packages:
|
||||
cmd_args = ["brew", "install"] + packages
|
||||
cmd_argss.append(["brew", "install"] + packages)
|
||||
elif manager == "pacman-package":
|
||||
packages = sorted(list(set(all_packages["pacman-package"])))
|
||||
if packages:
|
||||
cmd_args = ["pacman", "-S"] + packages
|
||||
cmd_argss.append(["pacman", "-S"] + packages)
|
||||
else:
|
||||
host_tuple = loader.build_opts.host_type.as_tuple_string()
|
||||
print(
|
||||
@@ -462,7 +468,7 @@ class InstallSysDepsCmd(ProjectCmdBase):
|
||||
)
|
||||
return
|
||||
|
||||
if cmd_args:
|
||||
for cmd_args in cmd_argss:
|
||||
if args.dry_run:
|
||||
print(" ".join(cmd_args))
|
||||
else:
|
||||
|
Reference in New Issue
Block a user