From d1375f059493115136f9476bfc8a816459076f9f Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Tue, 2 Aug 2016 19:30:29 -0500 Subject: [PATCH 1/3] always use long prefix --- conda_build/config.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conda_build/config.py b/conda_build/config.py index 733008d5e6..512a5a2f41 100644 --- a/conda_build/config.py +++ b/conda_build/config.py @@ -94,11 +94,7 @@ def _get_lua(self, prefix): @property def build_prefix(self): - if self.use_long_build_prefix is None: - raise Exception("I don't know which build prefix to use yet") - if self.use_long_build_prefix: - return self.long_build_prefix - return self.short_build_prefix + return self.long_build_prefix @property def build_python(self): From 77bca685eb8ed2b50ec40e098070456cdaf74295 Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Tue, 2 Aug 2016 20:04:22 -0500 Subject: [PATCH 2/3] fix find_prefix_files to account for long prefix --- tests/test_build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_build.py b/tests/test_build.py index 40cdc9140d..1996854fa5 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -27,6 +27,8 @@ def test_find_prefix_files(): """ # create a temporary folder prefix = os.path.join(sys.prefix, "envs", "_build") + # duplicate long build prefix + prefix = max(prefix, (prefix + 8 * '_placehold')[:80]) if not os.path.isdir(prefix): os.makedirs(prefix) with TemporaryDirectory(prefix=prefix + os.path.sep) as tmpdir: From cd9b471488022309ac3c0cc37e78bfc7fc906290 Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Tue, 2 Aug 2016 20:23:16 -0500 Subject: [PATCH 3/3] use config.build_prefix for win build env activation --- conda_build/windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_build/windows.py b/conda_build/windows.py index 3335e37248..89f4a74d95 100644 --- a/conda_build/windows.py +++ b/conda_build/windows.py @@ -212,7 +212,7 @@ def build(m, bld_bat, dirty=False, activate=True): fo.write("set LIB={};%LIB%\n".format(env["LIBRARY_LIB"])) fo.write(msvc_env_cmd(bits=cc.bits, override=m.get_value('build/msvc_compiler', None))) if activate: - fo.write("call activate.bat _build\n") + fo.write("call activate.bat {0}\n".format(config.build_prefix)) fo.write("REM ===== end generated header =====\n") fo.write(data)