-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Three dlls should be copied to the base directory of the package on windows #101
Comments
That would have been an option if symlinks worked, but they don't on windows without elevated permissions. |
Can we add a copy command here in the script? |
No, then pypy will be using the DLLs that were used at build time and not the updated DLLs |
OK. BTW, I am working on getting |
Not really. It's in the zlib package itself. We added it because it's a tiny DLL. expat, ffi on the hand are not. |
Here is what the base directory looks like after copying the three dlls. I am not sure those three add all that much. There is the security problem that once copied, they become part of the release so updating any of them requires updating the feedstock. I think the last few times I saw a problem with libexpat or libbz2 the fixes required recompiling python anyway, so I am not sure how concerning security considerations are.
|
Another option would be to load |
Here is the area in the code that would need to change to make |
I tried searching through CPython issues and history for why python.exe is statically linked to libpython.dll and if anyone had considered using dlopen() instead without much luck. |
Looking at the link above about adding manifests to allow searching other directories, I think the steps are:
The source code for the exe (main.c) is one line:
and the commands to compile it is:
|
@isuruf it seems a bit silly to implement this for these three DLLS when conda-forge copies about 50 runtime dlls into the base directory (as well as duplicating them for every environment into |
This is affecting tools and extensions for VS Code, see : microsoft/vscode-isort#291 |
As @mattip commented, there are already a few dozen libraries copied into the main folder, and the ffi-8, bz2 and expat are about half a megabyte in total. For 99.999% of all systems this won't make a difference, and the rest will heavily optimize any installation anyways. I don't see why such a simple solution should be ignored. If there is ever an issue because of 3 duplicate files, you can still create some assembly or whatever 🙄 |
Solution to issue cannot be found in the documentation.
Issue
xref conda-forge/miniforge#385. Running the package on windows without adding the
Library/bin
directory to the path fails. That directory is added by activation, but the interpreter should run without requiring activation. The solution would be to copylibbz2.dll
,libexpat.dll
,ffi-8.dll
into the base directory during the build.Installed packages
Environment info
The text was updated successfully, but these errors were encountered: