-
Notifications
You must be signed in to change notification settings - Fork 293
Package individually not working with pipenv modules #268
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
Comments
Good catch. That was probably over looked in the package individually implementation. cc @cgrimal |
- migrates tests from bats to tape
- migrates tests from bats to tape
It would be nice if this were documented somewhere. |
Is it already fixed? I took a long time searching for a solution until I find this issue. I was suspecting that Pipfile was not supported in modules. |
It seems to not be fixed, but we would definitely be happy to accept a solution/improvement PR for this. 💯 |
I have a service where each function is a module using pipenv to manage dependencies for each module. The plugin doesn't generate requirements.txt using pipenv unless I have a Pipfile in the root of the service, even if I have them in the modules. However, when I do that, the plugin generates a requirements.txt for each module using the root pipfile instead of the pipfile in the module itself.
I think the issue might be in the function "pipfileToRequirements()" in pipenv.js. It always passes the service root to the spawnSync call.
Packaging seems to work if I manually generate the requirements.txt in each module prior to sls deploy/package. Though there is still another issue where serverless generates two zips per function. One zip is named the lambda function name specified in serverless.yml that follows include/exclude but otherwise would contain the entire service. The other is a zip named the lambda function after it is deployed which I believe is the one generated by this plugin. My understanding according to the docs is there should only be 2 zips?
I'm not sure if these two issues are related to each other nor if the second issue isn't really an issue and is just how it works currently, so I'd like some insight into this if possible.
I've created a reproduction repo for this here:
https://github.com/username-dot-com/sls-python-test
The text was updated successfully, but these errors were encountered: