benfogle / crossenv

Cross-compiling virtualenv for Python
MIT License
108 stars 22 forks source link

Replace removed sysconfig._is_python_source_dir with equivalent #104

Closed virtuald closed 1 year ago

virtuald commented 1 year ago

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 commented 1 year ago

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

Safihre commented 1 year ago

Any updates? Hoping for a Python 3.11 compatibility release 😊

virtuald commented 1 year ago

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

benfogle commented 1 year ago

Looks good. Merging now.

Safihre commented 1 year ago

Awesome 👍👍