crossenv icon indicating copy to clipboard operation
crossenv copied to clipboard

Broken in 3.11rc2

Open virtuald opened this issue 3 years ago • 2 comments
trafficstars

Looks like they removed sysconfig._is_python_source_dir in https://github.com/python/cpython/commit/067597522a9002f3b8aff7f46033f10acb2381e4

virtuald avatar Oct 14 '22 06:10 virtuald

If you need a 3.11 cross environment to play with, I've got some docker-based stuff at https://github.com/robotpy/robotpy-cross-docker/pull/8

virtuald avatar Oct 14 '22 06:10 virtuald

I have a fix. The reason it broke is because of one of the new speed enhancements to CPython that freezes several commonly used modules that never change -- and site.py is one of them, which disables all of crossenv's patches.

Adding the option -X frozen_modules=off fixes that, which then leads to importlib machinery trying to import something with imports something which imports math... so I also add lib-dynload to the initial interpreter path and everything seems to work now.

virtuald avatar Oct 26 '22 04:10 virtuald