-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for v2 of awscli #828
Comments
cc @mariusvniekerk (as this seems like something you might be interested in 🙂) |
Great to see this! I've got a hacked fork of this and the botocore repo for v2:
Luckily I happened to build those packages before the awscrt dependency was introduced. In addition to the issues already mentioned:
I'm happy to help out with this. |
@manics thanks for that info! Didn't notice that botocore dependency from the v2 branch. Those versions are not even tagged :/ I'm curious how are boto3, botocore and awscli supposed to co-exist in an environment if awscli depends on botocore 2.0.0devX and boto3 is range constrained to botocore>=1.20.90,<1.21.0? Also, I just saw this post aws/aws-cli#6186 where @shaunhickson writes:
Could be relevant to this effort. |
Seems boto3 and awscli v2 should not go into the same virtual environment :/ |
i guess the only way to get them to coexist is to rather drastically alter the package so that awscli v2 vendors botocore v2 in a relocated place. That feels awful. |
Totally willing to entertain work on this as a separate branch. Getting the conda-forge automation to see and respond to upstream v2 releases doesn't seem straightforward right now. If they're working on source distribution of v2, who knows when that will be ready to make use of. |
New proposal from AWS (via aws/aws-cli#6355)): Official way to build/install:
Alternative PEP 517 way to build/install:
|
That seems promising. Does that install to the same import place as before? |
I've built a conda package using https://github.com/kyleknap/aws-cli/tree/poc-sdist as linked from aws/aws-cli#6352 To test it:
This is the diff from my current v2 package: manics/awscli-feedstock@v2...manics:proposal-6352 diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 09ba19d..0375ebd 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,15 +1,15 @@
{% set name = "awscli" %}
-{% set version = "2.1.38" %}
-
-{% set botocore_pin = "2.0.0dev106" %}
+{% set version = "2.proposal.6352" %}
+{% set git_rev = "391e55079f2259bfb8bb06525720e3661ca066ea" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
- git_url: https://github.com/aws/aws-cli.git
- git_rev: {{ version }}
+ git_url: https://github.com/kyleknap/aws-cli.git
+ # https://github.com/kyleknap/aws-cli/tree/poc-sdist
+ git_rev: {{ git_rev }}
build:
number: 0
@@ -17,7 +17,6 @@ build:
# https://github.com/amancevice/homebrew-core/blob/78db076bcc232c93d3df78209e72e1d6b9a358b1/Formula/awscli.rb#L47
script: |
{{ PYTHON }} -m pip install . --no-deps -vv
- {{ PYTHON }} scripts/gen-ac-index --include-builtin-index --index-location /tmp/ignore.ac
requirements:
host:
@@ -28,37 +27,47 @@ requirements:
# dependencies too. YAML anchors don't support merging lists so we have to
# duplicate everything :-(
# Commented lines are the original requirements from
- # https://github.com/aws/aws-cli/blob/2.1.38/setup.py#L27-L37
- - botocore =={{ botocore_pin }}
+ # https://github.com/kyleknap/aws-cli/blob/391e55079f2259bfb8bb06525720e3661ca066ea/setup.cfg#L29-L39
# - colorama >=0.2.5,<0.4.4
- colorama >=0.2.5,<0.5.0
# - docutils >=0.10,<0.16
- docutils >=0.10,<0.18
# - cryptography >=3.3.2,<3.4.0
- cryptography >=3.3.2,<3.5.0
- - s3transfer >=0.3.0,<0.4.0
# - ruamel.yaml >=0.15.0,<0.16.0
- ruamel.yaml >=0.15.0,<0.17.0
- wcwidth <0.2.0
- prompt_toolkit >=2.0.0,<3.0.0
- distro >=1.5.0,<1.6.0
+ # - awscrt==0.11.13
+ - awscrt >=0.11.13,<0.12.0
+ - python-dateutil>=2.1,<3.0.0
+ - jmespath>=0.7.1,<1.0.0
+ - urllib3>=1.25.4,<1.27
+
+ build:
+ - setuptools >=40.6.0
+ - wheel
run:
# Commented lines are the original requirements from
- # https://github.com/aws/aws-cli/blob/2.1.38/setup.py#L27-L37
- - botocore =={{ botocore_pin }}
+ # https://github.com/kyleknap/aws-cli/blob/391e55079f2259bfb8bb06525720e3661ca066ea/setup.cfg#L29-L39
# - colorama >=0.2.5,<0.4.4
- colorama >=0.2.5,<0.5.0
# - docutils >=0.10,<0.16
- docutils >=0.10,<0.18
# - cryptography >=3.3.2,<3.4.0
- cryptography >=3.3.2,<3.5.0
- - s3transfer >=0.3.0,<0.4.0
# - ruamel.yaml >=0.15.0,<0.16.0
- ruamel.yaml >=0.15.0,<0.17.0
- wcwidth <0.2.0
- prompt_toolkit >=2.0.0,<3.0.0
- distro >=1.5.0,<1.6.0
+ # - awscrt==0.11.13
+ - awscrt >=0.11.13,<0.12.0
+ - python-dateutil>=2.1,<3.0.0
+ - jmespath>=0.7.1,<1.0.0
+ - urllib3>=1.25.4,<1.27
test:
commands: This is the diff from this repo (v1): master...manics:proposal-6352 diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 0ce040f..0375ebd 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,57 +1,110 @@
{% set name = "awscli" %}
-{% set version = "1.20.34" %}
-{% set hash = "8d6dd12d84e5d9e071e25389776d5539a642dfe232caefacfcdb649ba4234fd6" %}
-
-{% set vmajor,vminor,vpatch = version.split('.') %}
-# ALWAYS DOUBLE-CHECK THESE OFFSETS AGAINST UPSTREAM setup.py
-{% set botocore_major = vmajor | int + 0 %}
-{% set botocore_minor = vminor | int + 1 %}
-{% set botocore_patch = vpatch | int + 0 %}
-{% set botocore_pin = botocore_major ~ '.' ~ botocore_minor ~ '.' ~ botocore_patch %}
+{% set version = "2.proposal.6352" %}
+{% set git_rev = "391e55079f2259bfb8bb06525720e3661ca066ea" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
- fn: {{ name }}-{{ version }}.tar.gz
- url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
- sha256: {{ hash }}
+ git_url: https://github.com/kyleknap/aws-cli.git
+ # https://github.com/kyleknap/aws-cli/tree/poc-sdist
+ git_rev: {{ git_rev }}
build:
number: 0
- script: {{ PYTHON }} -m pip install . --no-deps -vv
+ noarch: python
+ # https://github.com/amancevice/homebrew-core/blob/78db076bcc232c93d3df78209e72e1d6b9a358b1/Formula/awscli.rb#L47
+ script: |
+ {{ PYTHON }} -m pip install . --no-deps -vv
requirements:
host:
- - python
-# - python >=3.6
+ - python >=3.6
- pip
+ # The build process generates the autocomplete index (scripts/gen-ac-index)
+ # which requires importing awscli modules, so we need to install all runtime
+ # dependencies too. YAML anchors don't support merging lists so we have to
+ # duplicate everything :-(
+ # Commented lines are the original requirements from
+ # https://github.com/kyleknap/aws-cli/blob/391e55079f2259bfb8bb06525720e3661ca066ea/setup.cfg#L29-L39
+ # - colorama >=0.2.5,<0.4.4
+ - colorama >=0.2.5,<0.5.0
+ # - docutils >=0.10,<0.16
+ - docutils >=0.10,<0.18
+ # - cryptography >=3.3.2,<3.4.0
+ - cryptography >=3.3.2,<3.5.0
+ # - ruamel.yaml >=0.15.0,<0.16.0
+ - ruamel.yaml >=0.15.0,<0.17.0
+ - wcwidth <0.2.0
+ - prompt_toolkit >=2.0.0,<3.0.0
+ - distro >=1.5.0,<1.6.0
+ # - awscrt==0.11.13
+ - awscrt >=0.11.13,<0.12.0
+ - python-dateutil>=2.1,<3.0.0
+ - jmespath>=0.7.1,<1.0.0
+ - urllib3>=1.25.4,<1.27
+
+ build:
+ - setuptools >=40.6.0
+ - wheel
run:
- - python
-# - python >=3.6
- - botocore =={{ botocore_pin }}
- - colorama >=0.2.5,<0.4.4
- - docutils >=0.10,<0.16
- - rsa >=3.1.2,<4.8
- - s3transfer >=0.5.0,<0.6.0
- - pyyaml >=3.10,<5.5
+ # Commented lines are the original requirements from
+ # https://github.com/kyleknap/aws-cli/blob/391e55079f2259bfb8bb06525720e3661ca066ea/setup.cfg#L29-L39
+ # - colorama >=0.2.5,<0.4.4
+ - colorama >=0.2.5,<0.5.0
+ # - docutils >=0.10,<0.16
+ - docutils >=0.10,<0.18
+ # - cryptography >=3.3.2,<3.4.0
+ - cryptography >=3.3.2,<3.5.0
+ # - ruamel.yaml >=0.15.0,<0.16.0
+ - ruamel.yaml >=0.15.0,<0.17.0
+ - wcwidth <0.2.0
+ - prompt_toolkit >=2.0.0,<3.0.0
+ - distro >=1.5.0,<1.6.0
+ # - awscrt==0.11.13
+ - awscrt >=0.11.13,<0.12.0
+ - python-dateutil>=2.1,<3.0.0
+ - jmespath>=0.7.1,<1.0.0
+ - urllib3>=1.25.4,<1.27
test:
+ commands:
+ - aws_completer
+ # TODO: Check autocomplete index exists:
+ # lib/python3.x/site-packages/awscli/data/ac.index
imports:
- awscli
+ - awscli.autocomplete
+ - awscli.autoprompt
+ - awscli.bcdoc
- awscli.customizations
+ - awscli.customizations.cloudformation
- awscli.customizations.cloudtrail
+ - awscli.customizations.codeartifact
- awscli.customizations.codedeploy
- awscli.customizations.configservice
- awscli.customizations.configure
- awscli.customizations.datapipeline
+ - awscli.customizations.dlm
+ - awscli.customizations.dynamodb
- awscli.customizations.ec2
+ - awscli.customizations.ecs
+ - awscli.customizations.eks
- awscli.customizations.emr
+ - awscli.customizations.emrcontainers
- awscli.customizations.gamelift
+ - awscli.customizations.history
+ - awscli.customizations.lightsail
+ - awscli.customizations.logs
- awscli.customizations.s3
- awscli.customizations.s3.syncstrategy
+ - awscli.customizations.servicecatalog
+ - awscli.customizations.sso
+ - awscli.customizations.wizard
+ - awscli.customizations.wizard.ui
+ - awscli.customizations.wizard.wizards
about:
home: https://aws.amazon.com/cli/
@@ -64,5 +117,4 @@ about:
extra:
recipe-maintainers:
- - hajapy
- - tkelman
+ - manics |
The proposal was accepted, follow aws/aws-cli#6785 for updates on the implementation |
At some point in the past year:
This means we should have everything needed to package v2: #1204 |
Hi, any news about the timeline of v2 package availability? Thanks! |
There were test failures where #1204 was left off, and I guess the author didn't have the time to resolve them. Looks like the logs have expired and it's a bit stale, so could be taken over by someone else. Is there functionality that's available in v2 but not in v1? Otherwise v1 is still actively supported and has new releases basically daily. |
Yes there are a few new features in v2. Nothing essential as far as I am concerned, but AWS now recommends installing v2 in their docs and in the help messages:
I took a look at the current status and unfortunately I don't think I can take this task as of now, sorry. |
Thanks to @xhochy this was done! It's in a separate feedstock repo https://github.com/conda-forge/awscli2-feedstock but it pushes to https://anaconda.org/conda-forge/awscli so |
A discussion was started about supporting v2 of the awscli: https://gitter.im/conda-forge/conda-forge.github.io?at=60bfbd6a9cc69444a029b1dc.
There are a few challenges I will highlight here:
Options:
a. Drop support for awscli v1 in cf in favor of v2, but need to resolve issues 1 & 2.
b. Continue to support both versions of the awscli -> most likely move to multiple feedstocks (what should the second one be called in light of the pre-existing but different feedstock?)
c. ??
The text was updated successfully, but these errors were encountered: