summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-11-13 22:20:15 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-11-13 22:20:15 +0100
commiteade7e9f7a88175c14023696591c125cc6fd105a (patch)
treeedabb59ec2417d584c1ec6453ee8a1afe57458f7 /setup.py
parentfe33c56b60ae88ea3ad1632ef8193176a9b1906f (diff)
downloadpygobject-eade7e9f7a88175c14023696591c125cc6fd105a.tar.gz
setup.py: Make it possible to build without cairo through an env var. See #250
PYGOBJECT_WITHOUT_PYCAIRO=1 python3 setup.py install or with a recent pip: PYGOBJECT_WITHOUT_PYCAIRO=1 pip3 install --no-build-isolation pygobject I don't see a nice way for telling pip not to require pycairo, so this will have to do for now.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 7489e1b8..b4aa14c8 100755
--- a/setup.py
+++ b/setup.py
@@ -47,8 +47,10 @@ GI_VERSION_REQUIRED = "1.46.0"
PYCAIRO_VERSION_REQUIRED = "1.11.1"
LIBFFI_VERSION_REQUIRED = "3.0"
-WITH_CAIRO = True
-"""Set to false if you don't want to build with cairo/pycairo support"""
+WITH_CAIRO = not bool(os.environ.get("PYGOBJECT_WITHOUT_PYCAIRO"))
+"""Set PYGOBJECT_WITHOUT_PYCAIRO if you don't want to build with
+cairo/pycairo support. Note that this option might get removed in the future.
+"""
def is_dev_version():