IronLanguages / ironpython3

Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime.
Apache License 2.0
2.49k stars 288 forks source link

Some test cases try to run ipy with -I and fail in release mode #1440

Open slozier opened 2 years ago

slozier commented 2 years ago

This is basically like trying to import a module when running from the bin/Release folder without having set IRONPYTHONPATH. Because our standard libary is not in the normal location it fails to import.

For example.

bin/Release/net46/ipy.exe -I -c "import runpy"

will always fail because the standard library is not found on the path.

In 3.6, some tests, in test_gzip and test_macpath for example, use the test.support.script_helper.assert_python_ok method which runs ipy in isolated mode by default. This is causing failures.

A workaround was added to https://github.com/IronLanguages/ironpython3/pull/1427 and should be reverted once this is resolved.

BCSharp commented 2 years ago

I know that this was done on purpose, but why the full Lib is not copied or linked into bin/Release/*/?

slozier commented 2 years ago

I know that this was done on purpose, but why the full Lib is not copied or linked into bin/Release/*/?

Not sure exactly what the reasoning was (if it was my call then I forgot all about it). We can certainly reconsider - I seem to recall a few cases of people having issues getting the release build to run because of this (e.g. https://github.com/IronLanguages/ironpython3/issues/821).

BCSharp commented 2 years ago

I always assumed that it was to make the staging build simpler, but since my recent dive into the IronPython MSBuild scripts I don't think it makes much difference. Maybe worth trying and seeing what happens (beside having this issue go away).