-
Notifications
You must be signed in to change notification settings - Fork 32
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
Suggestion: A self-contained binary for easier installation #29
Comments
Sure thing! |
Thanks @mumoshu ! |
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` Note that running the pex binary requires a working python3 installation beforehand.
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`
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`
…30) 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`
@mumoshu How did you get the dist stage to successfully build? I'm trying to debug this, but it requires lxml for all possible platforms being built. As lxml is distributed only as platform specific wheels, I've tried download only the specific platform, but they do not seem to match your platforms in pex. What was the configuration you used when testing this to build on all the specified platforms? |
In my organization, dozens of devs are starting to use onelogin-aws-cli(Thank you very much for creating/maintaining this!). The only and largest struggle for me is that many of them already has a working python2 and/or python3 envs each with virutalenv(s) or no virtualenv at all. There seems like no uniform, easy way to keep one's
onelogin-aws-login
installation up-to-date and accessible whatever python/virutualenv he/she uses for ones own development work.Possible solution
While hanging around GitHub, I got to know that there's a tool named pex which is capable of creating a self-contained executable python env for your app.
See how it works in the wild at e.g.: datawire/forge@6fd6d6d
Would you mind hosting the self-contained binary at GitHub releases of this project once if I contributed the script for automating it?
Thanks!
The text was updated successfully, but these errors were encountered: