Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Huge standalone
-
I downloaded the PythonistaProjectTemplate to compile my scripts into fully working standalone apps.
But the resulting app is huge!! Almost 90Mb.
I opened the package and I noticed that there is a lot included that is NEVER used in my app. For example, the Textures folder contains 3444 images and I don't use a single one of them.
Is it possible to streamline the compiled app? May I delete stuff.
And is there any way to NOT include all this stuff when compiling in Xcode so that I don't have to, manually, delete everything after? -
If you don't use any of the images in the Textures folder, you can safely delete them before building the Xcode project. I would recommend keeping the folder itself though. Same goes for sound effects (.caf files), though they aren't as big. If you don't use matplotlib/numpy/sympy in your script, you can also remove/empty the pylib_ext folder, which is also quite big.
-
Thank you so much :-)
Is it better to delete those from the project folder to start with or delete them from the package once it is created? -
It's better to remove them from the project folder before building.
-
@omz, is there any strategy for trimming the included runtime? I too face these huge app sizes and was wondering if we can create various different xcode templates with increasingly more libs and runtime and some that are minimal, using some basic Python and that's all. I have a jailbroken iPad and I find it useful for my own purposes to create .ipa apps that can be installed to the device and each provide some small set of housekeeping tasks that keep my iPad running smoothly.
Is it safe to remove any parts of the python runtime itself in the name of getting the template down in size? If not, can you provide explicit steps to reduce the libraries?
-
@ltddev You could reduce the size a bit by removing things in pylib (particularly pylib/site-packages) that you don't use (hardly any script uses the entire standard library). Be careful though, some things depend on others... As for the size of the binary library (libpythonista), it's not possible to make that smaller yourself, though I could build a smaller version of it in the future – not completely sure what I'd remove though... I could probably make a minimal template that doesn't include third-party modules and images by default...
-
@omz, a minimalized template without 3rd party would be a great start towards making your main lib smaller. And thanks, I will look into reducing some of the pylib site packages to cut back.