-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature request: pipenv bundle command #986
Comments
Hi @nicholasbishop! Feature requests are certainly welcome. I don't think this is in the scope of pipenv. Those directions essentially just tell you to copy your site packages folder along with your code. Pip does nothing but install the code to the site packages folder. You can get the location of your virutalenv by doing (on unix) |
I would vote for this feature. It is strange to have «check style» functionality and not to have some of the useful pip's functionality. I tried to migrate one of my AWS Lambda project to using pipenv, but it turned out that it's easier to use original venv functionality + pip + requirements.txt. Just because I can't specify exact directory of package installation with pipenv. |
@Zebradil If you mean |
I found this example on GitHub that looks sensible for packaging Lambdas with |
@joestump Unfortunately that's not sensible (unless you work in an environment where there's a large homogeneity of systems). I've been through similar hoops in the last few days. You might encounter both In the end the easiest remains, as @Zebradil pointed out:
That way you can just point the This makes it rather platform-agnostic (had to get this working on a Linux, macOS, and Windows environment). Having to step out of pipenv with a |
In addition, I do need to check that |
At the end I got to the following command: $ pipenv run pip install -r <(pipenv lock -r) --target _build/ Works with bash, doesn't work with pure shell. |
The problem was that if I want to try the redirection soltion in a Makefile the result became unreadable fast. And like you said, I figured that having the |
The easiest way around this is stuffing the requirements into a temp file. See below
|
@erinxocon could we at least make |
That sounds like a reasonable idea. Would you mind open an issue (and maybe create a PEEP proposal) for it? Meanwhile one of the following should return what you need:
Refer to sysconfig documentation on more keys to use (and the difference between purelib and platlib, although I believe these two should be identical in most virtual environment contexts). |
(Hope it's OK to file a feature request here, didn't see any explicit documentation regarding that.)
tl;dr: I'd like to use pipenv to generate a bundle suitable for AWS Lambda
For reference, here is the AWS Lambda documentation for how to create a bundle with pip:
http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html#deployment-pkg-for-virtualenv
There are a couple existing pipenv issues that touch on this use case:
But neither of those directly requests this feature, so I figured it might be helpful to do so.
The text was updated successfully, but these errors were encountered: