Does the zip need to reside in disk to be loaded. Or can it be loaded from memory? I don't want it to be loaded from disk but from Memory
On Mon, Jul 9, 2018 at 9:59 AM Alberto Garcia <agarciaillera@gmail.com> wrote:
Ohhhhhhhh I guess you mean this:
https://github.com/anthony-tuininga/cx_Freeze/blob/master/source/bases/Commo...
Right?
> On Mon, Jul 9, 2018 at 9:48 AM Alberto Garcia <agarciaillera@gmail.com> wrote:
> Thank you for your response,
>
> I was thinking on creating that zip file with the content of the Lib folder and having my c code to download it over the network and have it in memory.
> I guess that the zip file should have no compression at all right?
>
> When you say that I need to use the cx_freeze approach what do you mean? Can you point me to where they do that?
>
> And why changing sys.path again to the executable again? Which part of the executable?
>
> I'll put my efforts in this.
>
> Thank you
>
>> On Mon, Jul 9, 2018 at 7:16 AM Nick Coghlan <ncoghlan@gmail.com> wrote:
>> On 9 July 2018 at 03:10, Alberto Garcia <agarciaillera@gmail.com> wrote:
>> > Hey there,
>> >
>> > Yes, the part of having the pyd modules built in in library is already done.
>> > I followed the instructions in the README. What I would like to know now is
>> > how to embed the non frozen python (py) modules. Can you guys please point
>> > me in the right direction.
>>
>> The gist is to:
>>
>> 1. take the entire Lib directory and put it in a zip archive
>> 2. use the approach demonstrated in cx_freeze to point sys.path in
>> your static executable at that zip archive
>> 3. adjust your C code to point sys.path back at the executable itself,
>> and then combine your executable and the zip archive into a single
>> contiguous file (similar to what zipapp does with it's helper script
>> and app archive)
>>
>> There are likely to still be rough edges when doing that, since this
>> isn't a well tested configuration. When all else fails, find the part
>> of the source code responsible for any error messages you're seeing,
>> and try to work out if there's a setting you can tweak to avoid
>> hitting that code path.
>>
>> Cheers,
>> Nick.
>>
>> --
>> Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
> --
> Alberto García Illera
>
> GPG Public Key: https://goo.gl/twKUUv
--
Alberto García Illera
GPG Public Key: https://goo.gl/twKUUv