From e696405f3d456e2e9fe7252273572dca7f591460 Mon Sep 17 00:00:00 2001 From: Jia Chen Date: Mon, 10 Jan 2022 11:22:47 -0800 Subject: [PATCH] Fix JSON loading issue in `setup.py` Summary: Address github issue #560 Reviewed By: gbleaney Differential Revision: D33511420 fbshipit-source-id: 80cdd2b1bc63ffa39cd86dee5c62e093692191d5 --- scripts/pypi/build_pypi_package.py | 1 + scripts/pypi/setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pypi/build_pypi_package.py b/scripts/pypi/build_pypi_package.py index ef2e341d991..6e5327ba57c 100644 --- a/scripts/pypi/build_pypi_package.py +++ b/scripts/pypi/build_pypi_package.py @@ -285,6 +285,7 @@ def build_pypi_package( dependencies = [ line.strip() for line in (pyre_directory / "requirements.txt").read_text().split("\n") + if len(line) > 0 ] with tempfile.TemporaryDirectory() as build_root: build_path = Path(build_root) diff --git a/scripts/pypi/setup.py b/scripts/pypi/setup.py index 3880fef7fea..88ca8a5f8fc 100644 --- a/scripts/pypi/setup.py +++ b/scripts/pypi/setup.py @@ -149,7 +149,7 @@ def main() -> None: package_name="{PACKAGE_NAME}", package_version="{PACKAGE_VERSION}", module_name="{MODULE_NAME}", - runtime_dependencies=json.loads("""{RUNTIME_DEPENDENCIES}"""), + runtime_dependencies=json.loads(r"""{RUNTIME_DEPENDENCIES}"""), long_description=long_description, )