mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-05 19:55:47 +03:00
update python to 3.8
Summary: Update to a newer python that builds on macOS Big Sur, make eden_scm depend on it and use it from PATH python 3.8 requires libffi which is reference via its pkg-config setup, however python's pkg-config libffi detection is broken (https://bugs.python.org/issue34823) with the documented workaround requiring an environment variable to be passed into its ./configure step, which is why this change also adds a feature to AutoconfBuilder With the updated python in place I was able to remove disable_env_override_pkgconfig = 1 disable_env_override_path = 1 from the eden_scm config so that it actually uses the pkg-configs, PATHs and other settings from its dependencies. This should make future python and other dependency upgrades much simpler. Reviewed By: HarveyHunt Differential Revision: D32231261 fbshipit-source-id: a2b6addbe22f38e3d71618c802d2c6f836fdd86c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
487d4abb0f
commit
e357474839
@@ -198,11 +198,22 @@ class CMakeBootStrapBuilder(MakeBuilder):
|
||||
|
||||
|
||||
class AutoconfBuilder(BuilderBase):
|
||||
def __init__(self, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, args):
|
||||
def __init__(
|
||||
self,
|
||||
build_opts,
|
||||
ctx,
|
||||
manifest,
|
||||
src_dir,
|
||||
build_dir,
|
||||
inst_dir,
|
||||
args,
|
||||
conf_env_args,
|
||||
):
|
||||
super(AutoconfBuilder, self).__init__(
|
||||
build_opts, ctx, manifest, src_dir, build_dir, inst_dir
|
||||
)
|
||||
self.args = args or []
|
||||
self.conf_env_args = conf_env_args or {}
|
||||
|
||||
def _build(self, install_dirs, reconfigure):
|
||||
configure_path = os.path.join(self.src_dir, "configure")
|
||||
@@ -210,6 +221,16 @@ class AutoconfBuilder(BuilderBase):
|
||||
|
||||
env = self._compute_env(install_dirs)
|
||||
|
||||
# Some configure scripts need additional env values passed derived from cmds
|
||||
for (k, cmd_args) in self.conf_env_args.items():
|
||||
out = (
|
||||
subprocess.check_output(cmd_args, env=dict(env.items()))
|
||||
.decode("utf-8")
|
||||
.strip()
|
||||
)
|
||||
if out:
|
||||
env.set(k, out)
|
||||
|
||||
if not os.path.exists(configure_path):
|
||||
print("%s doesn't exist, so reconfiguring" % configure_path)
|
||||
# This libtoolize call is a bit gross; the issue is that
|
||||
|
Reference in New Issue
Block a user