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

[aws-cli] Add plan.ps1 to aws-cli #2543

Merged
merged 1 commit into from May 8, 2019
Merged

Conversation

tduffield
Copy link
Contributor

Signed-off-by: Tom Duffield tom@chef.io

@chef-expeditor
Copy link
Contributor

chef-expeditor bot commented May 3, 2019

Hello tduffield! Thanks for the pull request!

Here is what will happen next:

  1. Your PR will be reviewed by the maintainers.
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

aws-cli/plan.ps1 Outdated Show resolved Hide resolved
}

function Invoke-Prepare {
python -m virtualenv "$pkg_prefix"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought that this would have required you to pip install virtualenv. With python3 you should be able to use python's venv: python -m venv $pkg_prefix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get an error that says the venv module does not exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird, looking at the packages that is in 3.6 but missing in 3.7. Our build is the same for both so it seems like it is missing from source. investigating...

@tduffield tduffield marked this pull request as ready for review May 6, 2019 18:27
@tduffield tduffield requested a review from a team as a code owner May 6, 2019 18:27
@smacfarlane
Copy link
Contributor

I think the virtualenv isn't doing what we expect it to do:

PS C:\Users\Administrator\core-plans> cat C:\hab\pkgs\core\aws-cli\1.16.153\20190507142534\Scripts\aws
#!C:\hab\studios\Users--Administrator--core-plans\hab\pkgs\core\aws-cli\1.16.153\20190507142534\Scripts\python.exe
# Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Running hab pkg exec core/aws-cli aws help results in:

✗✗✗
✗✗✗ %1 is not a valid Win32 application. (os error 193)
✗✗✗

hab pkg exec core/aws-cli aws.cmd help does behave correctly.

Is it expected that a user should run aws.cmd on windows instead of aws like they would on linux?

@tduffield
Copy link
Contributor Author

@smacfarlane that has been my experience with a number of different apps, not just python apps. Ruby apps as well require you to call thing.bat instead of thing.

@smacfarlane
Copy link
Contributor

@tduffield 👍 It looks like the #! issue may be related to habitat-sh/habitat#6483 which means solving it here would be non-trivial. I'll file an issue to loop back on this plan once that is resolved.

Would you mind adding a small note to the Usage section of the README that users should call aws.cmd on Windows instead of aws?

Signed-off-by: Tom Duffield <tom@chef.io>
@smacfarlane smacfarlane merged commit b2c696e into master May 8, 2019
@chef-ci chef-ci deleted the tduffield/win-aws-cli branch May 8, 2019 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants