awsrun
awsrun copied to clipboard
azurerun too?
While it may be handy to have azurerun mixed in with awsrun, not everyone that uses aws also uses azure. So, building in a private environment, I have to pull in all the azure dependencies down as well, when I have no need for them. Perhaps this should be broken up into multiple packages with the proper dependencies for awsrun vs. azurerun? Just a thought.
Yes, good idea. The main code is entirely CSP-independent with the exception of the CSP-specific plug-ins and commands, which are loaded based on the name of the installed script. The actual two scripts, awsrun
and azurerun
, are identical in every way. I just need to think of the best way of separating them.
As part of swapping over to pyproject.toml
for the project, I broke out the dependencies by CSP, so you can now install only AWS dependencies. For example, you can do the following now pip install ".[aws]"
. And, once I publish a new release to pypi, pip install "awsrun[aws]"
.
I'm also going to break out all of the dependencies required by each bundled command separately so they aren't installed by default in the spirit of keeping the required reps to a minimum. I'll add an optional section for a command's deps, and then an "allcmds" dep that will include all of them. So, for example, if you want to use the "last" command bundled with awsrun, you'd need to install awsrun as follows:
$ pip install awsrun[last]
Since not all of the bundled commands have extra deps, to make it easy for the user, I'll add a check when they attempt to use a bundled command to make sure there are no missing imports. If there are, a nice message stating they need to install the optional deps (as above).
I'll work on that over the next day or so, then will release a new version bumping the MAJOR version to 3. While nothing in the API, the packaging is not backwards compatible, so it likely warrants the bump.
Version 3.0.0 has been released which breaks out all dependencies into optional ones.