From 252dd218de631a5bfc3afabb7e89ec268385a2f7 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 16 Oct 2023 22:34:40 -0400 Subject: Allow setup.py to ignore OpenCV dependency. Long story, but setuptools has a hard time recognizing system-managed OpenCV, and tries to install it anywway when building RasterCarve Live. Allow suppressing that installation by setting the environment variable SETUP_IGNORE_OPENCV=1. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index bb9025c..ab86e49 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import os import setuptools from rastercarve import __version__ @@ -25,7 +26,7 @@ setuptools.setup( "Topic :: Utilities", ], python_requires='>=3.6', - install_requires=["opencv-python", "numpy", "tqdm", "argparse"], + install_requires=["numpy", "tqdm", "argparse"] + ["opencv-python"] if os.getenv("SETUP_IGNORE_OPENCV", "0")=="0" else [], entry_points={ "console_scripts": [ "rastercarve=rastercarve.__main__:main", -- cgit v1.1