void-packages/srcpkgs/libgdal/patches/40-fix-setup-py-cc.patch

20 lines
1.1 KiB
Diff
Raw Normal View History

2022-10-30 03:35:32 +01:00
--- a/swig/python/setup.py.in
+++ b/swig/python/setup.py.in
@@ -29,14 +29,12 @@
if os.environ['CXX'].strip().startswith('ccache ') and os.environ['CXX'].strip()[len('ccache '):].find(' ') < 0:
os.environ['CXX'] = os.environ['CXX'].strip()[len('ccache '):]
else:
- print('WARNING: "CXX=%s" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of setuptools' % os.environ['CXX'])
- del os.environ['CXX']
+ os.environ['CXX'] = os.environ['CXX'].split(' ', 1)[0]
if 'CC' in os.environ and os.environ['CC'].strip().find(' ') >= 0:
if os.environ['CC'].strip().startswith('ccache ') and os.environ['CC'].strip()[len('ccache '):].find(' ') < 0:
os.environ['CC'] = os.environ['CC'].strip()[len('ccache '):]
else:
- print('WARNING: "CC=%s" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of setuptools' % os.environ['CC'])
- del os.environ['CC']
+ os.environ['CC'] = os.environ['CC'].split(' ', 1)[0]
# ---------------------------------------------------------------------------
# Switches