Skip to content
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

Replace removed sysconfig._is_python_source_dir with equivalent #104

Merged
merged 2 commits into from
Dec 11, 2022

Conversation

virtuald
Copy link
Contributor

@virtuald virtuald commented Oct 25, 2022

For #103 , but Python 3.11 still doesn't work. Tested with 3.11 final release. Heres the errors I'm still getting.

# python3.11 -m crossenv /build/crosspy/bin/python3.11 /build/venv --sysroot=$(arm-frc2023-linux-gnueabi-gcc -print-sysroot) --env UNIXCONFDIR=/build/venv/cross/etc -vvvv
WARNING: CC is a compound command (['arm-frc2023-linux-gnueabi-gcc', '-pthread'])
WARNING: This can cause issues for modules that don't expect it.
WARNING: Consider setting CC='arm-frc2023-linux-gnueabi-gcc' and CFLAGS='-pthread'
WARNING: CXX is a compound command (['arm-frc2023-linux-gnueabi-c++', '-pthread'])
WARNING: This can cause issues for modules that don't expect it.
WARNING: Consider setting CXX='arm-frc2023-linux-gnueabi-c++' and CXXFLAGS='-pthread'
WARNING: The cross-compiler ('arm-frc2023-linux-gnueabi-gcc -pthread') does not appear to be for the correct architecture (got arm-nilrt-linux-gnueabi, expected armv7l-frc2023-linux-gnueabi). Use --cc to correct, if necessary.
INFO: Creating build-python environment
INFO: Creating cross-python environment
INFO: Installing cross-pip
DEBUG: Installing: ['pip==22.3', 'setuptools==65.5.0']
/build/venv/cross/bin/python3.11: No module named pip
INFO: Finishing up...

I looked at it for awhile and... I'm not really sure what's going on. I'm open to looking into this more if you can give me some hints.


Figured it out. Fixes pushed here.

@Safihre
Copy link

Safihre commented Nov 2, 2022

Thank you, this works!
We rely heavily on crossenv at SynoCommunity.

Copy link
Owner

@benfogle benfogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still poking at this locally, but it looks good so far. Thank you for taking the time to track this down.

crossenv/__init__.py Outdated Show resolved Hide resolved
crossenv/scripts/pywrapper.py.tmpl Outdated Show resolved Hide resolved
@Safihre
Copy link

Safihre commented Nov 13, 2022

Any updates? Hoping for a Python 3.11 compatibility release 😊

- One of the new speed enhancements to CPython freezes several commonly used modules that never change -- and site.py is one of them, which disables all of crossenv's patches. Disabling frozen modules fixes this
- The importlib machinery imports something which eventually imports math, so add lib-dynload to the initial interpreter path
@virtuald
Copy link
Contributor Author

virtuald commented Dec 1, 2022

Changes made. FWIW my project has been using this for a month and it works great as far as I can tell.

@benfogle benfogle merged commit 6778487 into benfogle:master Dec 11, 2022
@benfogle
Copy link
Owner

Looks good. Merging now.

@Safihre
Copy link

Safihre commented Dec 11, 2022

Awesome 👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants