[openwrt-19.07] python3: Use default _PYTHON_HOST_PLATFORM#12755
Merged
neheb merged 1 commit intoopenwrt:openwrt-19.07from Jul 8, 2020
Merged
[openwrt-19.07] python3: Use default _PYTHON_HOST_PLATFORM#12755neheb merged 1 commit intoopenwrt:openwrt-19.07from
neheb merged 1 commit intoopenwrt:openwrt-19.07from
Conversation
This lets the Python build process set _PYTHON_HOST_PLATFORM instead of forcing an explicit value. Also: * Save the target _PYTHON_HOST_PLATFORM value during Build/InstallDev for use when building target Python packages (in python3-package.mk). * Use the (mostly) default PYTHON_FOR_BUILD value, instead patch configure to remove the platform triplet from the sysconfigdata file name. * Remove the "CROSS_COMPILE=yes" make variable (there is no indication that this variable is necessary). * Force host pip to build packages from source instead of downloading binary wheels. Previously, host pip can download universal (platform-independent) wheels but not platform-specific wheels, because of the custom _PYTHON_HOST_PLATFORM value. (Packages that do not have universal wheels would be compiled from source.) With a correct _PYTHON_HOST_PLATFORM, host pip can install platform-specific wheels as well. However, the pre-built shared object (.so) files in these wheels will have the host's platform triplet in their file names. When target Python packages are built (using the target's _PYTHON_HOST_PLATFORM), Python will not use these shared object files. By forcing host pip to build packages from source, the built shared object files will not have the platform triplet in their file names. (Host Python has been patched to remove the platform triplet from file names.) This allows these packages to be used when building target Python packages. (The net effect of this complete change is that platform-dependent packages will continue to be compiled from source, while platform-independent packages will now also be compiled from source.) Fixes openwrt#12680. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Member
|
If you would like, I can use Turris infrastructure to test it with the full build. |
This was referenced Jul 8, 2020
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintainer: me, @commodo
Compile tested: armvirt-64, 19.07.3 sdk
Run tested: armvirt-64 (qemu), 19.07.3
Description:
This lets the Python build process set
_PYTHON_HOST_PLATFORMinstead of forcing an explicit value.Also:
Save the target
_PYTHON_HOST_PLATFORMvalue duringBuild/InstallDevfor use when building target Python packages (in python3-package.mk).Use the (mostly) default
PYTHON_FOR_BUILDvalue, instead patch configure to remove the platform triplet from the sysconfigdata file name.Remove the
CROSS_COMPILE=yesmake variable (there is no indication that this variable is necessary).Force host pip to build packages from source instead of downloading binary wheels.
Previously, host pip can download universal (platform-independent) wheels but not platform-specific wheels, because of the custom
_PYTHON_HOST_PLATFORMvalue. (Packages that do not have universal wheels would be compiled from source.)With a correct
_PYTHON_HOST_PLATFORM, host pip can install platform-specific wheels as well. However, the pre-built shared object (.so) files in these wheels will have the host's platform triplet in their file names. When target Python packages are built (using the target's_PYTHON_HOST_PLATFORM), Python will not use these shared object files.By forcing host pip to build packages from source, the built shared object files will not have the platform triplet in their file names. (Host Python has been patched to remove the platform triplet from file names.) This allows these packages to be used when building target Python packages.
(The net effect of this complete change is that platform-dependent packages will continue to be compiled from source, while platform-independent packages will now also be compiled from source.)
Fixes #12680.
Signed-off-by: Jeffery To jeffery.to@gmail.com