Skip to content

Commit cff69f4

Browse files
alexmalyshevmeta-codesync[bot]
authored andcommitted
Use pip instead of calling setup.py directly in getdeps
Summary: This should fix the invalid egg_info command error. X-link: facebookincubator/cinderx#28 Reviewed By: jbower-fb Differential Revision: D101747255 Pulled By: alexmalyshev fbshipit-source-id: 543b3e8b041cb3303634d1fd6bf5a8f8142a0ca2
1 parent 8cbc33b commit cff69f4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

build/fbcode_builder/getdeps/builder.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,17 +1622,18 @@ def _build(self, reconfigure: bool) -> None:
16221622
# pyre-fixme[6]: For 2nd argument expected `str` but got `Optional[str]`.
16231623
env[key] = value
16241624

1625-
setup_py_path = os.path.join(self.src_dir, "setup.py")
1626-
1627-
if not os.path.exists(setup_py_path):
1628-
raise RuntimeError(f"setup.py script not found at {setup_py_path}")
1629-
16301625
self._check_cmd(
16311626
# pyre-fixme[6]: For 1st argument expected `List[str]` but got
16321627
# `List[Union[str, None, str]]`.
16331628
# pyre-fixme[6]: For 1st argument expected `Mapping[str, str]` but got
16341629
# `Env`.
1635-
[path_search(env, "python3"), setup_py_path, "install"],
1630+
[
1631+
path_search(env, "python3"),
1632+
"-m",
1633+
"pip",
1634+
"install",
1635+
".",
1636+
],
16361637
cwd=self.src_dir,
16371638
env=env,
16381639
)

0 commit comments

Comments
 (0)