aws / aws-elastic-beanstalk-cli-setup

Simplified EB CLI installation mechanism.
Apache License 2.0
512 stars 226 forks source link

add pipx as installation option #135

Open adehad opened 2 years ago

adehad commented 2 years ago

Description of changes:

  1. Propose the usage of pipx, a PyPA supported way to install executables in an isolated virtual environment.

It is likely that this method obsoletes the scripts in this repository.

Contributor suggestion

As mentioned in section 5.5:

https://github.com/aws/aws-elastic-beanstalk-cli-setup/blob/6b2d6646c728e9ccfc6bb482926bb6ba5451c322/README.md#55-are-there-dependency-problems-that-this-mode-of-installation-doesnt-solve

It is possible for the dependencies of awsebcli to conflict.

A suggestion I have is to use the --pip-args argument, to add a --constraint to the dependencies installed.

Example constraints.txt file:

awsebcli==3.20.3
botocore==1.23.54
cement==2.8.2
certifi==2022.6.15
charset-normalizer==2.0.12
colorama==0.4.3
future==0.16.0
idna==3.3
jmespath==0.10.0
pathspec==0.9.0
pypiwin32==223
python-dateutil==2.8.2
pywin32==304
PyYAML==5.4.1
requests==2.26.0
semantic-version==2.8.5
six==1.14.0
termcolor==1.1.0
urllib3==1.26.12
wcwidth==0.1.9

Example usage of constraints file located from github:

pipx install awsebcli --pip-args "--constraint https://raw.githubusercontent.com/pycontribs/jira/main/constraints.txt

NOTE:

  1. Here I have used the constraints.txt from another repository, but if this approach is considered for this package it should exist within this repository.
  2. Using this file would mean that the file needs to be updated every single time awsebcli is updated, as its version contained in the constrained dependencies above. But we can simple omit entries we do not want constrained and only update other dependencies when there are breaking changes, e.g. lock packages that are not under AWS control and only bump their versions when it would conflict with the AWS owned awsebcli or botocore pakckages.

Issue #, if available:

N/A

Agreement:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.