You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On utilzing the relocatable-python for native packaging, it successfully creates the python framework object for the target version till 3.9.9 [Listed here]
To check if the framework is universal or not, run the universal script in terminal
Using Python 3.9.9
90 libraries (*.so and *.dylib) found in the framework; only 0 are universal!...
Python.framework/Versions/3.9.9/Resources/Python.app/Contents/MacOS/Python is not universal!
Python.framework/Versions/Current/Python is not universal!
Python.framework/Versions/Current/bin/python3.9.9 is not universal!
The above issues arise due since the current Python framework is not built as a universal binary, which means it only supports a single architecture. This poses a problem as our users may be using different architectures, and we want our framework to be compatible with all of them. The following issues have been identified:
Lack of support for building universal Python frameworks
Failure to compile libraries for both arm64 and x86_64 architectures
Libraries compiled for a specific architecture may cause issues when used on another architecture
To address these issues and build a universal Python framework, the following can be potential solutions:
Use the ./configure --enable-universalsdk flag when building Python to ensure it is built as a universal binary.
Use the lipo tool to merge the architecture-specific libraries into a single universal library. This can be done by adding a script to our build process that calls lipo after each library is built. [here]
Ensure that any third-party libraries used by our framework are also built as universal binaries or, alternatively, provide separate builds for each architecture.
By following these steps, we can create a universal Python framework that is compatible with multiple architectures and can be used by a wider range of users.
On utilzing the relocatable-python for native packaging, it successfully creates the python framework object for the target version till 3.9.9 [Listed here]
To check if the framework is universal or not, run the universal script in terminal
It produces the following output:
The above issues arise due since the current Python framework is not built as a universal binary, which means it only supports a single architecture. This poses a problem as our users may be using different architectures, and we want our framework to be compatible with all of them. The following issues have been identified:
To address these issues and build a universal Python framework, the following can be potential solutions:
./configure --enable-universalsdk
flag when building Python to ensure it is built as a universal binary.lipo
tool to merge the architecture-specific libraries into a single universal library. This can be done by adding a script to our build process that calls lipo after each library is built. [here]By following these steps, we can create a universal Python framework that is compatible with multiple architectures and can be used by a wider range of users.
Originally posted by @brillard1 in #5 (comment)
The text was updated successfully, but these errors were encountered: