Skip to content
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

Also distribute CDK Toolkit via pip #972

Open
rix0rrr opened this issue Oct 19, 2018 · 7 comments

Comments

@rix0rrr
Copy link
Contributor

commented Oct 19, 2018

Only relevant once the Python bindings are out, but a comment has been made that it will be jarring to Python developers to have to npm install the Toolkit, and they would prefer to pip install it.

@fulghum

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

@ccfife this is a great one to get some customer data on

@bgdnlp

This comment has been minimized.

Copy link

commented Jun 17, 2019

Personal opinion, as a customer. Found this issue while looking for the state of Python tooling. IMO, the CDK is not a Python program, so I wouldn't use pip to install it.

I have to have Node installed anyway. I'm guessing that's the part most are not fans of, but that's not something that can be fixed (easily). NodeJS usually comes with npm. From that point it's just one command.

Since the CDK depends on NodeJS I'd expect to find it together with the other NodeJS packages, not the Python packages. Besides, since the CDK depends on NodeJS, wouldn't you have to also package NodeJS for installation with pip? Which is weird and probably not something people want.

Also, note that different systems install NodeJS packages in different directories. For example, the official installer for Mac will put Node and npm packages under /usr/local, but an npm installed with MacPorts will install aws-cdk under /opt/local/lib/node_modules.

I would like to be able to install the CDK (and its constructs) using MacPorts, I don't use Homebrew. Maybe a native package for Mac. I expect to be able to install the Python constructs with pip, which is how it works now. But the CDK itself? It's not a Python package, so I wouldn't expect to find it in pip.

@bgdnlp

This comment has been minimized.

Copy link

commented Jul 5, 2019

On the other hand, having the cdk as a Python module would make it easy to use it in a virtual environment. The way it is recommended now, with the CDK installed as a global npm module, it's not as straightforward to keep the construct libraries and the CDK on same version when working on multiple apps, each with its own Python venv.

It can still be done by installing the CDK locally, yes, it's just a bit inconvenient.

@eladb

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2019

Sounds useful!

@garnaat garnaat self-assigned this Aug 12, 2019

@brainstorm

This comment has been minimized.

Copy link

commented Sep 2, 2019

As a python dev I would expect CDK to be installed (with all its submodules for all sub-services) as a simple one-time pip install aws-cdk, IMHO.

More details as I jumped in recently into testing CDK over here: #3406 (comment)

Also, installing a venv automatically is rather intrusive since I'm already using Anaconda/Conda as a Venv manager (instead of python3's venv).

@bgdnlp

This comment has been minimized.

Copy link

commented Sep 2, 2019

Regarding installing a venv, you don't have to initialize a language/environment using --init. It's just there as a helper. You can start blank, nothing the CDK sets up there is actually required.

Personally, I only used --init the first time I tried the CDK, after that I found that it just gets in the way.

Maybe the documentation and examples should make that clearer.

@jeshan

This comment has been minimized.

Copy link

commented Sep 6, 2019

I think considering by language-specific is suboptimal as it won't scale. If npm isn't desirable by Python programmers, then the same argument could be made by the community behind each of the CDK-supported languages, e.g a .NET programmer could say that neither pip nor npm is desirable.

Maybe a better solution is to provide a native CDK binary per OS with pkg or nexe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.