omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    3
    7
    3895
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ruimac
      ruimac last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • ruimac
          ruimac last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • omz
            omz last edited by

            It's better to remove them from the project folder before building.

            1 Reply Last reply Reply Quote 0
            • ltddev
              ltddev last edited by

              @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?

              1 Reply Last reply Reply Quote 0
              • omz
                omz last edited by

                @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...

                1 Reply Last reply Reply Quote 0
                • ltddev
                  ltddev last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB Forums | Contributors