cpython #14
Loading…
Reference in New Issue
No description provided.
Delete Branch "AmourSpirit/zaz-pip:cpython"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the last update that I have at this time.
This update fixes an issue for Mac OS and Linux AppImage.
The issue is the same for both LibreOffice on Mac OS and Linux AppImage.
The issue is that any python package then contains binaries such as
numpy
orlxml
can not be imported into LIbreOffice Python.The reason for this has to do with the type of suffixes that python supports. Pip installs using the systems expected suffix whereas LibreOffice embedded python will alway use
*.cpython-3.8.so
.For example when pip installs packages that contain binary
.so
file it's name might be named something likebit_generator.cpython-38-x86_64-linux-gnu.so
. The issue is that the embedded python cannot import from this version of the binary file. For LibreOffice embedded python3.8.10
the file would need to be namedbit_generator.cpython-3.8.so
. This is the reason that numpy cannot be imported when installed via pip into Mac OS and Linux AppImage versions of LibreOffice.This solution corrects for this by creating symbolic links to all
*.cpython*.so
files to the name that LibreOffice embedded python expects. For example On Mac OS and Linxu AppImage, using this fix,bit_generator.cpython-3.8.so
is automatically created as a symbolic link tobit_generator.cpython-38-x86_64-linux-gnu.so
. The correct python version that is needed to create the links is automatically detected.When a package is removed an
unlink()
method is run to remove any broken symbolic links after the uninstall is completed.This is how I got some of my extensions such as Numpy for LibreOffice to work cross platform.
See also: Python bug 36716
See also sym_link_cpython of my Python LibreOffice Pip Extension Template project.
BTW: When might I expect an update for the extension? I would like to start updating my Pip & Virtual Environments guides.
Great...