mycli
mycli copied to clipboard
Create a standalone binary build
There are several problems with our current deployment through pypi:
- It relies on the user's system having python3.6+. Those who are stuck with python 2 will also be stuck with an obsolete mycli version.
- It relies on the user's system for dependency management. It can lead to breakages in a lot of ways that we don't control: there may be conflicts with other python applications, or dependencies may be updated in ways that break mycli. Both have happened a lot of times.
- To address the problems in (2), we have to specify broad ranges of required versions of packages in our dependency list. But our CI always installs the newest versions, and so users may experience problems with older dependencies that we don't notice until they open an issue.
I propose to create standalone binary builds with PyOxidizer (like iredis does) and then possibly switch our main deployment strategy to just shipping these builds. PyPI packages will of course also remain available.
There are a couple of things to do in preparation:
- Refactor code so it no longer depends on
__file__
. Otherwise, we will need to ship additional text files alongside the binary, which defies the purpose of the trivial deployment. - As binaries are platform-specific, we need to set up more OSes in CI. Github Actions now supports Windows and Mac OS instances, so it should be straightforward to cover the most common architectures. I don't know if we should care about weirder ones.