Giter Club home page Giter Club logo

Comments (10)

MetricMike avatar MetricMike commented on May 28, 2024 1

Probably!

I think in a future enhancement, I'll move v2 installs to the bundled releases. I very much agree that not having to require an external would be great, and make this more like an asdf plugin instead of a fancy pip package.

Unfortunately, I don't have a mac environment to work with, but I think I can exploit github actions to do some error-driven development there.

from asdf-plugins.

smorimoto avatar smorimoto commented on May 28, 2024

It should be implementable as a single plugin.

from asdf-plugins.

MetricMike avatar MetricMike commented on May 28, 2024

I've been exploring this plugin and it would vastly simplify support for v1/v2 and arbitrary versions of such if I install from source. That requires relying on:

  1. an existing python installation available on the PATH
  2. installing or upgrading dependencies to whichever pip is on PATH

In theory, few users would require awscli without already having a usable python installation (whether ASDF- or system-provided). I'm a little more concerned about polluting the pip environment, especially because I'm wary of folks who use project-specific virtualenvs. This is especially a problem if a user installs awscli with one python active on the path, and then switches to another python or virtualenv.

Installing using the "AWS-blessed" packages is a bit tricky because I'm juggling a few different packages that assume a lot for different cases (for example, v1 user linux vs v2 mac in particular have different requirements for sudo and write-access to the installer's preferred location).

While I'm working on that, are there any objections/concerns I should be aware of with this approach?

from asdf-plugins.

shousper avatar shousper commented on May 28, 2024

SGTM. I had hoped AWS would make it a little easier to query for a version list, install and update their cli, but that doesn't seem to have changed yet.

FWIW, I gave up pinning and just updated our scripts to work with the then-latest V2 and all was well.

When I raised this it was due to some recent updates that introduced breaking changes (deprecated features removed IIRC). Hopefully an uncommon occurrence 🙂

from asdf-plugins.

jthegedus avatar jthegedus commented on May 28, 2024

If there were a plugin for this I would suggest it just supports awscli v2 as it has its deps bundled.

from asdf-plugins.

MetricMike avatar MetricMike commented on May 28, 2024

Added, requires Python 3.7.5+. Supports v1, v2, and a hypothetical v3 assuming aws/aws-cli doesn't change the build from source instructions.

Builds/installs to a virtualenv and hooks into asdf shims so that it doesn't touch the rest of your python installation or pip packages and continues working if you installed with a bare 3.9+ python setup but are in a 3.7 project.

If you install this with an ASDF-provided python and then remove that python, this will break, but I don't think that's a worthwhile edge case for this to look out for.

from asdf-plugins.

jthegedus avatar jthegedus commented on May 28, 2024

If you install this with an ASDF-provided python and then remove that python, this will break
By break, do you mean the plugin's install method, the whole plugin or just the AWS CLI?

I thought AWS CLI v2 had system specific binaries that bundle their own Python deps so no need to build from source or require a local Python, am I understanding this incorrectly?

from asdf-plugins.

MetricMike avatar MetricMike commented on May 28, 2024

By break, I mean that:

asdf install python 3.9.1
asdf install awscli 2.19.24
aws --version #works
asdf uninstall python 3.9.1
aws --version #complains that ~/.asdf/installs/python/3.9.1 no longer exists

v2 does have platform-specific releases, but they're "just" a folder with an embedded python. By supporting the platform-specific releases, this plugin would have to support 4+ (v2 mac/windows/linux, v1 python) different installation patterns. By building from source, I can support any platform that looks like linux and has bash/tar/curl/Python3.7.5+.

My specific use case for this plugin required switching between v1 and v2, so only supporting v2 releases wasn't an option.

from asdf-plugins.

jthegedus avatar jthegedus commented on May 28, 2024

My specific use case for this plugin required switching between v1 and v2, so only supporting v2 releases wasn't an option.

I see.

Is there a way to build v2 and embed the python with it during build so changing Python versions only affects v1? One of the major changes for v2 was no longer relying on external Python installations which I am a huge fan of and will use when possible.

from asdf-plugins.

jthegedus avatar jthegedus commented on May 28, 2024

I think in a future enhancement, I'll move v2 installs to the bundled releases.

🎉 Looking forward to this!

I have a mac device and can assist with testing, just pint me in your repo!

from asdf-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.