aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2023-10-16 22:34:40 -0400
committerFranklin Wei <franklin@rockbox.org>2023-10-16 22:34:40 -0400
commit252dd218de631a5bfc3afabb7e89ec268385a2f7 (patch)
tree0da6fbe12e1a98b18ac25f243cbac25cc2be2a46 /setup.py
parent959c7213154dfdf686ef1d993ddc8750b9eb4cfe (diff)
downloadrastercarve-252dd218de631a5bfc3afabb7e89ec268385a2f7.zip
rastercarve-252dd218de631a5bfc3afabb7e89ec268385a2f7.tar.gz
rastercarve-252dd218de631a5bfc3afabb7e89ec268385a2f7.tar.bz2
rastercarve-252dd218de631a5bfc3afabb7e89ec268385a2f7.tar.xz
Allow setup.py to ignore OpenCV dependency.HEADmaster
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.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py3
1 files changed, 2 insertions, 1 deletions
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",