how to force Pyinstaller to leave a dependencies out of the bundle?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to force Pyinstaller to leave a dependencies out of the bundle?

Gianluca Storti
Hi Everyone,
I have the need to leave outside of the bundle one file that I can constantly edit. For example my executable has to read a table of variables that I need to frequently edit.
How can I force PyInstaller to leave out that dependency?

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to force Pyinstaller to leave a dependencies out of the bundle?

Hartmut Goebel
Am 15.09.2016 um 19:57 schrieb Gianluca Storti:
How can I force PyInstaller to leave out that dependency?

You need to *not* make this file a module, but handle it like a data file. If you really want to handle it like a module, you'll need to use --exclude-module and implement your own import mechanism - which in the end will be the same as handling it as a data-file :-)


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/get-current-locale-with-ansible
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to force Pyinstaller to leave a dependencies out of the bundle?

Steve Barnes


On 16/09/2016 12:18, Hartmut Goebel wrote:
> Am 15.09.2016 um 19:57 schrieb Gianluca Storti:
>> How can I force PyInstaller to leave out that dependency?
>
> You need to *not* make this file a module, but handle it like a data
> file. If you really want to handle it like a module, you'll need to use
> --exclude-module and implement your own import mechanism - which in the
> end will be the same as handling it as a data-file :-)
>
>
Security is the other major reason to read in data as data rather than
as a python module is that you an make sure that the data file is never
executed, (by avoiding exec & eval statements). Then if someone
introduces malicious content it will be rejected.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Loading...