Commits

Gael Pasgrimaud  committed 05875f6

allow to use extra env vars

  • Participants
  • Parent commits 65d4791

Comments (0)

Files changed (3)

File docs/deliverance.cfg

+[buildout]
+develop = .
+parts = deliverance
+versions = versions
+
+[versions]
+lxml=2.2alpha1
+
+[deliverance]
+recipe = gp.recipe.pip
+env=
+    STATIC_DEPS=true
+install =
+    Cython
+    lxml
+    http://deliverance.openplans.org/dist/Deliverance-snapshot-latest.pybundle
+interpreter = python

File docs/lxml.cfg

+[buildout]
+develop = .
+parts = deliverance
+
+[deliverance]
+recipe = gp.recipe.pip
+env=
+    STATIC_DEPS=true
+install =
+    Cython
+    lxml==2.2alpha1
+interpreter = python
+

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',''))]))
         env.update({
              'PYTHONPATH': ':'.join(sys.path),
              'CFLAGS': '-I%s' % include_dir,
                     })
 
         # call pip
+        print env.keys()
         #print 'PYTHONPATH=%s' % env['PYTHONPATH']
-        #print ' '.join(cmd)
+        print ' '.join(cmd)
         code = call(' '.join(cmd), shell=True, env=env)
         if code != 0:
             raise RuntimeError('An error occur during pip installation. See %s-log.txt' % self.name)