-
Notifications
You must be signed in to change notification settings - Fork 428
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
Encoding issues on Windows build in the fix_staged_scripts step #1632
Comments
Thanks for isolating this. I have had a very hard time reproducing it, but your case here should work. |
Using the latest
I'm preparing a PR which definitely (I hope) fixes the issue. 😁 |
Dang. I really hope you have a better handle on it than I do. I'm pretty lost on these unicode issues. Thanks for working on it. |
Depending on the contents of the exe-scripts, trying to guess an encoding is dangerous, best handling everything in binary at this point. Fix conda#1632
Hi there, thank you for your contribution! This issue has been automatically locked because it has not had recent activity after being closed. Please open a new issue if needed. Thanks! |
Hello.
I'm trying to build the waf package on windows, but I'm having some trouble with
conda_build
in thefix_staged_scripts
step. I couldn't find any similar issue. I'll follow with some details:While building, there is a file named
waf
that is meant to be moved to the%SCRIPTS%
folder. The problem seems to be thatconda-build
tries to read the file to do some checking, but fails to do so because of the file encoding (https://github.com/conda/conda-build/blob/master/conda_build/windows.py#L45)I believe the waf file should be opened with encoding='iso-8859-1'. Making a local change replacing with the code bellow builds the package successfully, but is not a solution:
Any suggestions here? I'm unsure how this case should be handled.
I'll leave some suggestions that occurred me:
1- Fix this at package level, by avoiding running into the
fix_staged_scripts
function, somehow. (I don't like this solution because it'll not really fix anything besides this specific package)2- Do some try...catch with several encodings near the presented code above
3- Have a metadata somewhere (maybe in the recipe?) to handle the file encoding. Fallback to the current case if none.
The text was updated successfully, but these errors were encountered: