From eade7e9f7a88175c14023696591c125cc6fd105a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 13 Nov 2018 22:20:15 +0100 Subject: 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. --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'setup.py') 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(): -- cgit v1.2.1