• esa@discuss.tchncs.de
    link
    fedilink
    arrow-up
    11
    ·
    1 day ago

    Distribution usually isn’t considered a strong point for Python, though.

    For other languages that build a static executable, the more expected method of distribution would be some automated workflow that builds artifacts for various os/architecture-triplets, that you can then just download off the project page.

    • namingthingsiseasy@programming.devOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Distribution usually isn’t considered a strong point for Python, though.

      It depends. If it’s a simple script with no external dependencies, then it’s very easy to distribute. But if your application has external dependencies and you are trying to install it on your host (and you aren’t using docker or similar technologies), then yes, it’s harder than just shipping an executable or .jar file. The fact that Python’s standard library is so comprehensive helps a lot in this regard, but it only works up to a certain point.

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        It depends. If it’s a simple script with no external dependencies, then it’s very easy to distribute

        it really isn’t. Try distributing anything that needs openssl under the hood (which is part of Python’s stdlib). I spent years deploying Python and Ruby tools next to each other to other devs machines. Python is incredibly hard to distribute, even to the same OS across a company. I really think that most people that think “Python is easy” actually haven’t ever tried using other languages and seen how easy it is there. Even Java jars are easier to deploy than Python, both if you’re making an executable and if you’re just having the user build or run the code directly. The only thing that is even close in difficulty from all the top languages for deployment is C/C++. Everything else is vastly easier. Part of that comes from Python’s ridiculous tooling (15+ different tools at this point https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/) and part of it comes from the fact that Python chooses to bundle old or out of date versions of libraries causing conflicts in newer systems, like OpenSSL.