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

Support for building self-contained binaries for easier installation #30

Merged
merged 2 commits into from
Feb 18, 2018

Conversation

mumoshu
Copy link
Contributor

@mumoshu mumoshu commented Jan 23, 2018

This adds scripts/build.sh which produces a pex binary dist/onelogin-aws-login.

The pex binary supports multiple archs/platforms - currently, it is runnable on both linux/macOS, x86_64/i686.
The existing way to install onelogin-aws-login with pip install is still supported.

Note that a pex binary doesn't contain a python runtime. You still need to install python3 in order to run the onelogin-aws-login command.
However, this will still allow you to install onelogin-aws-login without polluting your python env. Also, installing onelogin-aws-login is easier as it is just a matter of running curl -o onelogin-aws-login <onelogin-aws-login release> && chmod +x onelogin-aws-login.

Resolves #29


This is verified to work by:

  • Running pip install -e . and then onelogin-aws-login
  • Running scripts/build.sh and then dist/onelogin-aws-login
  • Running docker build -t onelogin-aws-login-test . with Dockerfile:
    FROM alpine:3.7
    
    RUN apk add --update --no-cache python3
    
    ADD dist/onelogin-aws-login /
    
    and running docker run --rm -it onelogin-aws-login /onelogin-aws-login -h

This adds `scripts/build.sh` which produces a pex binary `dist/onelogin-aws-login`.

The pex binary supports multiple archs/platforms - currently, it is runnable on both linux/macOS, x86_64/i686.
The existing way to install onelogin-aws-login with `pip install` is still supported.

Note that a pex binary doesn't contain a python runtime. You still need to install python3 in order to run the onelogin-aws-login command.
However, this will still allow you to install onelogin-aws-login without polluting your python env. Also, installing onelogin-aws-login is easier as it is just a matter of running `curl -o onelogin-aws-login <onelogin-aws-login release> && chmod +x onelogin-aws-login`.

Resolves physera#29

---

This is verified to work by:

- Running `pip install -e .` and then `onelogin-aws-login`
- Running `scripts/build.sh` and then `dist/onelogin-aws-login`
- Running `docker build -t onelogin-aws-login-test .` with Dockerfile:
  ```
  FROM alpine:3.7

  RUN apk add --update --no-cache python3

  ADD dist/onelogin-aws-login /
  ```
  and running `docker run --rm -it onelogin-aws-login /onelogin-aws-login -h`
@slycoder
Copy link
Contributor

Apologies for the late response. Thanks for submitting this, we'd love to get it in! Could you update the conflicts on the PR to accommodate some other changes that have landed in the interim?

@mumoshu
Copy link
Contributor Author

mumoshu commented Jan 29, 2018

@slycoder No worry, thanks for taking your time!

Just fixed the conflict - resolving it produced no commit diff because it was just due to a fix to a line-ending.

@mumoshu
Copy link
Contributor Author

mumoshu commented Jan 29, 2018

@slycoder Just for your notice, the last travis build for this is failing due to the same errors seen in the current master.

@slycoder
Copy link
Contributor

Sorry about the delay. I'll go ahead and merge.

@slycoder slycoder merged commit e54a44c into physera:master Feb 18, 2018
slycoder added a commit that referenced this pull request Feb 20, 2018
slycoder added a commit that referenced this pull request Feb 20, 2018
drewsonne pushed a commit to drewsonne/onelogin-aws-cli that referenced this pull request Feb 20, 2018
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

2 participants