From dbb126db8d99185346cd1f52fdc537c03907dd55 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Tue, 22 Oct 2019 05:44:56 -0700 Subject: [PATCH] use optional dependencies Summary: shapely seems hard to install on windows, and it's not often required. Therefore make it optional. Reviewed By: takatosp1 Differential Revision: D18058677 fbshipit-source-id: 3dad50fe75f47ec5450a3732197f3c966d458361 --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 73b1c35..2a2ce44 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ line_length=100 multi_line_output=4 known_standard_library=numpy,setuptools known_myself=detectron2 -known_third_party=fvcore,matplotlib,cv2,torch,torchvision,PIL,pycocotools,yacs,termcolor,cityscapesscripts,tabulate,tqdm,scipy,lvis,torchvision,psutil +known_third_party=fvcore,matplotlib,cv2,torch,torchvision,PIL,pycocotools,yacs,termcolor,cityscapesscripts,tabulate,tqdm,scipy,lvis,psutil no_lines_before=STDLIB,THIRDPARTY sections=FUTURE,STDLIB,THIRDPARTY,myself,FIRSTPARTY,LOCALFOLDER default_section=FIRSTPARTY diff --git a/setup.py b/setup.py index e703c39..403474f 100644 --- a/setup.py +++ b/setup.py @@ -78,9 +78,9 @@ def get_extensions(): "cloudpickle", "matplotlib", "tqdm>4.29.0", - "shapely", "tensorboard", ], + extras_require={"all": ["shapely", "psutil"]}, ext_modules=get_extensions(), cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, )