lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment
MIT License
5.82k stars 431 forks source link

Use pipx for all global python binaries #297

Closed mhart closed 4 years ago

mhart commented 4 years ago
mhart commented 4 years ago

In case this breaks anyone's workflow, all existing build images have been tagged and published as:

lambci/lambda:20200719-build-${RUNTIME}

(eg, lambci/lambda:20200719-build-python3.6)

jfuss commented 4 years ago

@mhart Thanks for doing this. This looks good from what I can tell. I would have just used venv directly but pipx works too. Does pipx put the clis into the path automatically?

mhart commented 4 years ago

Yeah it does – saves a bit of fiddling that would come with manually doing this from venvs

twasink commented 4 years ago

From what I can tell from the docs, if you set the PIPX_BIN_DIR variable as part of doing the various pipx install steps, you could install the binaries into a path that wasn't in the /root/ dir, and thus into a place readable by non-root users - e.g. /usr/local/bin or /opt/bin.

This would avoid the whole "breaking people's workflow" problem.