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

Add cross-platform build ability #2068

Closed
wants to merge 1 commit into from
Closed

Add cross-platform build ability #2068

wants to merge 1 commit into from

Conversation

svlobanov
Copy link

Currently it is not possible to build psutil on MacOS for Linux
target using external toolchain. It fails due to build script
detects build host OS and changes build logic according to detected
OS.

This patch allows to redefine os.name and sys.platform using ENV
vars TARGET_OS_NAME and TARGET_SYS_PLATFORM. If these variables
are not defined then os.name and sys.platform is used as it does
currently.

Using this patch it is possible to compile psutil on MacOS with
OpenWrt GCC Toolchain (OpenWrt is Linux).

Signed-off-by: Sergey V. Lobanov sergey@lobanov.in

Summary

  • OS: { Build OS: MacOS, Target OS: Linux }
  • Bug fix: { yes }
  • Type: { scripts }
  • Fixes: { }

Description

Please see above

Currently it is not possible to build psutil on MacOS for Linux
target using external toolchain. It fails due to build script
detects build host OS and changes build logic according to detected
OS.

This patch allows to redefine os.name and sys.platform using ENV
vars TARGET_OS_NAME and TARGET_SYS_PLATFORM. If these variables
are not defined then os.name and sys.platform is used as it does
currently.

Using this patch it is possible to compile psutil on MacOS with
OpenWrt GCC Toolchain (OpenWrt is Linux).

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Aug 11, 2023
100_add_cross_platform_build_ability.patch was submitted upstream in
giampaolo/psutil#2068, but that pull request was
closed without being merged.

This replaces that patch with a simpler version that only updates
setup.py, leaving the run-time library code unchanged.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
1715173329 pushed a commit to openwrt/packages that referenced this pull request Aug 17, 2023
100_add_cross_platform_build_ability.patch was submitted upstream in
giampaolo/psutil#2068, but that pull request was
closed without being merged.

This replaces that patch with a simpler version that only updates
setup.py, leaving the run-time library code unchanged.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Aug 17, 2023
100_add_cross_platform_build_ability.patch was submitted upstream in
giampaolo/psutil#2068, but that pull request was
closed without being merged.

This replaces that patch with a simpler version that only updates
setup.py, leaving the run-time library code unchanged.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 56bac94)
1715173329 pushed a commit to openwrt/packages that referenced this pull request Aug 21, 2023
100_add_cross_platform_build_ability.patch was submitted upstream in
giampaolo/psutil#2068, but that pull request was
closed without being merged.

This replaces that patch with a simpler version that only updates
setup.py, leaving the run-time library code unchanged.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 56bac94)
lu-zero pushed a commit to domo-iot/packages that referenced this pull request Oct 23, 2023
100_add_cross_platform_build_ability.patch was submitted upstream in
giampaolo/psutil#2068, but that pull request was
closed without being merged.

This replaces that patch with a simpler version that only updates
setup.py, leaving the run-time library code unchanged.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This pull request was closed.
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.

None yet

1 participant