I am trying to port a software package written in Python to OpenWrt.
The package I am porting uses many of the standard Python packages. So far, I have been able to install these Python packages either using pip or using opkg. The process I have been using is to try to install the python package using pip first. For some reason, there are many Python packages that do not install with pip on OpenWrt. It is not clear to me why this is. In any case, when "pip install" does not work, I look for the package in the OpenWrt package repository and install it using "opkg install".
Now I have come across a Python package "pyNaCl" which I can not find in the OpenWrt package repository. I assume this means I need to build this package from source in order to use it. If this is not a case, I would appreciate a pointer to where I can find a version of "pyNaCl" for OpenWrt.
I have found this guide for porting Python packages to OpenWrt:
I assume that if I install a build environment for OpenWrt and then follow the instructions in this guide, I should be able to build this missing package.
If anyone has any tips on the process of compiling and creating a Python package for OpenWrt, please get back.
Sure, it would be great if you can share your solution!
Actually I'm stuck with getting libsodium compiled for mips, even though PyNaCl has a very nice option that allows you to skip libsodium from the build process and use a system provided library by setting SODIUM_INSTALL="system". But eventually I get this in the runtime:
ImportError: Error relocating /usr/lib/python3.6/site-packages/nacl/_sodium.abi3.so: crypto_shorthash_siphashx24_keybytes: symbol not found
I can't remember all the errors I fixed along the way of getting PyNaCl to work. I suspect the error "crypto_shorthash_siphashx24_keybytes: symbol not found" was solved by adding "DEPENDS+=libsodium @!LIBSODIUM_MINIMAL" to the Makefile.
Meanwhile this package has become a dependency if you want to use the mobile_app integration in Home Assistant. Would be great if we could add it to openwrt? (I somehow am not able to create a working package myself, see other posts)