Open B3QL opened 1 year ago
Thanks for the suggestion, we will look into this.
@adnan-kamili what is the current status? Can you share a rough ETA?
The problem with that approach is that the code assumes it will have access to the file system which is not always true.
In the case of LexActivator, it has to be true as it stores data on disk and also accesses a few files on the disk for its proper functioning.
That's totally true, but Python tries to abstract that by using importlib.resources
API.
In the current state, it's impossible to integrate your client safely with the PyOxidizer project, which allows to "binarize" Python applications.
By safely I mean storing Python wrapper around C libraries in binary itself, because if it's stored in filesystem it is possible to temper the wrapper and return fake data without ever calling C libs.
Ok, that makes sense. Would it be possible for you to submit a pull request?
I tried to come up with some solution but without a success. I can give it a shot next time I'll be working on licensing area, but it won't be soon.
Currently lexactivator is using
__file__
variable for path resolution (see: https://github.com/cryptlex/lexactivator-python/blob/master/cryptlex/lexactivator/lexactivator_native.py#L47) The problem with that approach is that the code assumes it will have access to the file system which is not always true.From Python 3.8, ResourceReader and importlib.resources are recommended ways of accessing package resources that enables interoprability across the Python ecosystem with projects like https://github.com/indygreg/PyOxidizer.
A more in-depth description of various loading mechanisms is available here