-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run conda
in isolated mode only if opted in
#4625
Conversation
pre-commit.ci autofix |
Can we just replace all |
Maybe, but |
================================== FAILURES ===================================
________________________________ test_convert _________________________________
[gw0] win32 -- Python 3.9.13 C:\Users\runneradmin\Miniconda3\python.exe
Traceback (most recent call last):
File "D:\a\conda-build\conda-build\tests\test_cli.py", line 448, in test_convert
main_convert.execute(args)
File "D:\a\conda-build\conda-build\conda_build\cli\main_convert.py", line 117, in execute
api.convert(f, **args.__dict__)
File "D:\a\conda-build\conda-build\conda_build\api.py", line 292, in convert
return conda_convert(package_file, output_dir=output_dir, show_imports=show_imports,
File "D:\a\conda-build\conda-build\conda_build\convert.py", line 796, in conda_convert
convert_from_windows_to_unix(file_path, output_dir, platform,
File "D:\a\conda-build\conda-build\conda_build\convert.py", line 709, in convert_from_windows_to_unix
update_lib_contents(directory, temp_dir, 'unix', file_path)
File "D:\a\conda-build\conda-build\conda_build\convert.py", line 279, in update_lib_contents
src_dir.rename(dst_dir)
File "C:\Users\runneradmin\Miniconda3\lib\pathlib.py", line 1382, in rename
self._accessor.rename(self, target)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb6ybnggj\\Lib' -> 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb6ybnggj\\lib' Windows filesystem is usually case insensitive, so that's why it's failing. However, Windows might be mounting case-sensitive filesystems and in that case that would be a valid operation... That said, I don't know why this is an error in this PR? I can't restart the failing jobs to see if it was a temporary issue. |
Hm, I'm not sure I understand. When conda-build is installed outside of the base environment, conda is also installed into this non-base environment. I'm suggesting we use the prefix for the environment that conda-build is installed into for this absolute path. If conda-build is installed in base it will point to the base conda, if it's installed elsewhere it'll point to that other conda install.
Yes. |
@kenodegard Oh I see, what you mean now. I guess that would work as well. I am afraid we break something else though (shebangs, different paths across operating systems...) Is it ok if for now we just do it with the (private) env var? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an acceptable stopgap. I have opened a new issue to investigate/refactor this using context.conda_exe
instead (#4628).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to private variable and updating snippet to indicate the current temporary nature of the current fix.
9f0eace
to
025d35a
Compare
Description
After discussing #4604 in the community calls, we have come to the conclusion that the changes there contained might disrupt packaging workflows in conda-forge and other communities. Some reasons:
PYTHON*
variables from being used and we are unsure this behavior is propagated to subprocesses (like the ones runningbuild.sh
andbld.bat
).conda-forge-ci-setup
setsPYTHONUNBUFFERED
conda
and its dependencies (a very small % of the whole packaging ecosystem), it makes more sense to not enable isolated unless requested explicitly via an environment variable.CONDA_BUILD_ISOLATED_ACTIVATION
. If set to a non-empty value, it will enable isolated mode forconda
invocations.Checklist - did you ...
news
directory (using the template) for the next release's release notes?