Search code examples
selinuxgrpc-python

Install GRPC from source for SELINUX 32bit


I have to install GRPC python from source as the target machine does not have internet connection. The target machine has python 3.7 and pip3 installed. Can anyone share the process how to do it. Thanks in advance


Solution

  • Here's how I solved the problem. The main issue with using the downloaded gRPC package is that the cython compiler is platform dependent. The cython compiler is found in the grpc/_cython and it looks something like this "cygrpc.cp37-win_amd64.pyd". Here cp37 is the python version, win is the os or the platform name and amd64 is the architecture.

    What I did in order to solve this issue, is I had to download the corresponding cython file for 32bit Linux platform - cygrpc.cpython-37m-i386-linux-gnu.so . I then created 2 separate grpc packages - one for Linux and one for Windows. This can be extended to as many platforms and architectures you want.

    After this using pf = platform.system() to determine the os and architecture and called the respective grpc package.

    This comprehensively solved the issue for me.