Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-03-04 23:36:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-04 23:43:47 +0400
commit5d74cac463742111999e15fb187d8457d1dd241a (patch)
treeb5bc7ace42a0f100faaa27de52e19e0d65a2d80c
parentac7fba322dddebe28e818f5a3a5af2e60bca2850 (diff)
Build system: option to copy 'requests' from scons.
-rw-r--r--build_files/scons/tools/Blender.py11
-rw-r--r--build_files/scons/tools/btools.py6
2 files changed, 15 insertions, 2 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index d5f9446e86a..d2220891843 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -868,6 +868,17 @@ def UnixPyBundle(target=None, source=None, env=None):
run("find '%s' -type d -name '*.a' -prune -exec rm -rf {} ';'" % numpy_target)
else:
print 'Failed to find numpy at %s, skipping copying' % numpy_src
+ del numpy_src, numpy_target
+
+ if env['WITH_BF_PYTHON_INSTALL_REQUESTS']:
+ requests_src = py_src + "/site-packages/requests"
+ requests_target = py_target + "/site-packages/requests"
+ if os.path.exists(requests_src):
+ run("cp -R '%s' '%s'" % (requests_src, os.path.dirname(requests_target)))
+ run("find '%s' -type d -name '*.pem -prune -exec rm -rf {} ';'" % requests_target)
+ else:
+ print('Failed to find requests at %s, skipping copying' % requests_src)
+ del requests_src, requests_target
run("find '%s' -type d -name 'test' -prune -exec rm -rf {} ';'" % py_target)
run("find '%s' -type d -name '__pycache__' -exec rm -rf {} ';'" % py_target)
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 744896cef2d..3450f292668 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -124,7 +124,8 @@ def validate_arguments(args, bc):
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
'WITHOUT_BF_INSTALL',
- 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', 'WITH_BF_PYTHON_INSTALL_NUMPY',
+ 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
+ 'WITH_BF_PYTHON_INSTALL_NUMPY', 'WITH_BF_PYTHON_INSTALL_REQUESTS',
'WITHOUT_BF_OVERWRITE_INSTALL',
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_STATICOPENMP', 'BF_OPENMP_STATIC_STATIC',
'WITH_GHOST_SDL',
@@ -520,7 +521,8 @@ def read_opts(env, cfg, args):
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
- (BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python mumpy module', False)),
+ (BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python numpy module', False)),
+ (BoolVariable('WITH_BF_PYTHON_INSTALL_REQUESTS', 'install Python requests module', False)),
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),