[pypy-commit] pypy default: use externals directory for 3rd party packages, setup via get_externals.py

mattip pypy.commits at gmail.com
Sun Mar 4 15:54:15 EST 2018


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r93951:e8813036ddc6
Date: 2018-03-04 12:32 -0800
http://bitbucket.org/pypy/pypy/changeset/e8813036ddc6/

Log:	use externals directory for 3rd party packages, setup via
	get_externals.py

diff --git a/pypy/tool/build_cffi_imports.py b/pypy/tool/build_cffi_imports.py
--- a/pypy/tool/build_cffi_imports.py
+++ b/pypy/tool/build_cffi_imports.py
@@ -29,6 +29,11 @@
     if status  != 0:
         status, stdout, stderr = run_subprocess(str(pypy_c), ['-m', 'ensurepip'])
     failures = []
+    env = os.environ.copy()
+    if sys.platform == 'win32':
+        env['INCLUDE'] = r'..\externals\include;' + env.get('INCLUDE', '')
+        env['LIB'] = r'..\externals\lib;' + env.get('LIB', '')
+        env['PATH'] = r'..\externals\bin;' + env.get('PATH', '')
     for key, module in sorted(cffi_build_scripts.items()):
         if module is None or getattr(options, 'no_' + key, False):
             continue
@@ -40,7 +45,8 @@
             cwd = None
         print('*', ' '.join(args), file=sys.stderr)
         try:
-            status, stdout, stderr = run_subprocess(str(pypy_c), args, cwd=cwd)
+            status, stdout, stderr = run_subprocess(str(pypy_c), args,
+                                                     cwd=cwd, env=env)
             if status != 0:
                 print(stdout, stderr, file=sys.stderr)
                 failures.append((key, module))


More information about the pypy-commit mailing list