Commits

Rob Miller  committed 7614a51

preserve any CFLAGS values specified in the buildout.cfg

  • Participants
  • Parent commits 92b1bb9

Comments (0)

Files changed (1)

File gp/recipe/pip/__init__.py

         # subprocess environ
         env = os.environ.copy()
         env.update(dict([v.split('=') for v in to_list(self.options.get('env',''))]))
+        orig_cflags = env.get('CFLAGS', '')
+        if orig_cflags:
+            orig_cflags += ' '
         env.update({
              'PYTHONPATH': ':'.join(sys.path),
-             'CFLAGS': '-I%s' % include_dir,
+             'CFLAGS': '%s-I%s' % (orig_cflags, include_dir),
              'LDFLAGS': '-I%s' % include_dir,
              })
 
                 target = get_config_var('MACOSX_DEPLOYMENT_TARGET')
                 isysroot = glob.glob('/Developer/SDKs/MacOSX10*')[-1]
                 env.update({
-                    'CFLAGS' : "-arch ppc -arch i386 -isysroot %s -O2 -I%s" % (isysroot, include_dir),
+                    'CFLAGS' : "%s-arch ppc -arch i386 -isysroot %s -O2 -I%s" % (orig_cflags, isysroot,
+                                                                                 include_dir),
                     'LDFLAGS' : "-arch ppc -arch i386 -isysroot %s -I%s" % (isysroot, include_dir),
                     'MACOSX_DEPLOYMENT_TARGET' : target
                     })