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.


    Latte, a package manager for StaSh

    Pythonista
    package manager idea project
    6
    12
    8590
    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.
    • JonB
      JonB last edited by JonB

      Rather than brewing up something from scratch, you might take a look at the few existing - proof - of - concepts, figure out what is missing, and make pull requests.

      These things never seem to really catch on, in large part because not many people are developing specifically for pythonista, and in part because of the tricky bit of the need for either a convienent central repository (who will keep up maintenance) or some sort of distributed list (discovery might be tricky).

      ywangd's pythonista tools installer makes use of the existing script index, which is nice and lightweight.

      1 Reply Last reply Reply Quote 2
      • AtomBombed
        AtomBombed last edited by

        @Phuket2 @JonB my plan is just to make it a package manager. You can connect it to various "supported" repository models. The package design is going to be different (for example, packages will have a manifest-type file for metadata, along with other stuff), but you can change Latte to point to those other supported repositories. Right now, the only one that is going to support it is my repo on GItHub, inside of public-packages. But once people catch on, maybe the packages and repositories will too, and then there will be multiple sources people can use in the future.

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

          Much like how you can add repositories other than the multiverse to apt-get. It's basically a version of things like brew, yarn, and apt for StaSh.

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

            My sense is that going into StaSH and running pip connects to the right multiverse of Python packages. There are now more than 100,000 packages in PyPI and I doubt that another multiverse will be better in the near term. I think that something that would help would be a repo that lists the known good packages for Pythonista. That way folks can stop trying to install packages that are known not to work.

            Given that pip in StaSH supports most of the useful commands of pip, perhaps it would help if you could write how each latte command would differ from the similar StaSH pip command and also what new commands latte would have that are not in pip... I love the brew home ___ and brew edit ___ commands.

            AtomBombed 1 Reply Last reply Reply Quote 0
            • AtomBombed
              AtomBombed @ccc last edited by

              @ccc yes. I agree. My aim isn't to remake pip. It is a repository for StaSh commands, essentially. If you want to make your own third-party StaSh command that doesn't come pre-installed with StaSh (such as echo), then you can make one as a package, send a pull request to my repository, it will then be reviewed, and then added (if it makes it past reviews). This is just a simple StaSh program manager.

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

                @JonB @ccc @Phuket2 I changed the post contents. I think my description of Latte was way far off of what I was trying to create. Re-read over the post again and give me another review.

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

                  Most people, when they create a useful stash command, issue a pull request against stash dev and it becomes part of stash. I guess I could see some use cases for standalone stash commands.

                  Though you are better off maintaining a list of repos/urls, rather than trying to
                  serve up .tar.gz directly (updates should come directly from a users github, and not rely on a pull request into yours)

                  Is there any significance behind the name? If this is indended to work like apt-get, or brew, etc, call it that or at least something descriptive (pkg-get?) and try to match the semantics, rather than something ambiguous and new. Imagine if instead of ls, in stash it was called santa, it would be confusing.

                  AtomBombed 1 Reply Last reply Reply Quote 0
                  • AtomBombed
                    AtomBombed @JonB last edited by

                    @JonB that's true. I'm trying to match the semantics, I just wanted a special name for it. It's kind of like a brew for StaSh. That's the reason for the name. I didn't want to do something like pkg-get mainly because it's too general. Idk. Maybe I should do it, but I feel like it means more if it has a cooler name. Plus, for example, if I made it compatible with all other repositories of Pythonista programs, they wouldn't be able to be run as a StaSh command.

                    Imagine I ran latte install abc123 (the test package on the repository right now). Then it would be put into the stash_extensions/bin folder. But it can only be run as a command if it's specifically formatted for it. Well, it could be run, but it wouldn't utilize the command line argument/option system if it wasn't specifically written for it. For example, if I connected Latte to install programs from Pythonista-Tools, the programs would only be static programs. They wouldn't change based on argument input. That's the whole point. So it's kind of hard to make it compatible with other pre-established programs.

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

                      Edit: I know my comment sounds like I'm talking about modules more than I'm talking about StaSh commands, but I think I have an idea so just bare with me for now :D

                      I support this idea. Pythonista is amazing, but when it comes to working out dependency or environment issues sometimes I wanna blow my brains out. I think a great starting point for this package manager would be to use all of the current custom modules that omz has directly integrated, like beautifulsoup, flask, Jedi, jinja2, numpy, paramiko, etc.

                      There definitely needs to be a more dedicated StaSh solution other than pip. Maybe I'm just stupid and there's a better way, but most the time I start installing stuff from pip I just end up breaking my StaSh install with a ton of incompatible dependencies.

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

                        I think that a custom solution that sits on top of pip might make sense. Not in the immediate future, but long-term. In a lot of cases, iOS needs to be special-cased, and it's quite common that a few files have to be patched to get some packages working in Pythonista. I'm thinking of something like a curated directory that's based on whitelisting pypi packages and in some cases hosting patches.

                        To be clear though, those are just some ideas, not something I'm actively working on at the moment.

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