I have a requirements.txt file like this:
-r requirements-pipenv.txt
-e ./api
because pipenv install doesn't work with -e. (You could also imagine different uses for -r in this file, such as those discussed here.)
When I sis deploy, though, I get this message:
Could not open requirements file: [Errno 2] No such file or directory: '.serverless/requirements-pipenv.txt'
This appears to be because this plugin only copies requirements.txt and not files that it includes. I looked at the README and didn't see a way to make it include other files, but I might have missed something.
It would be useful if the plugin either:
-r lines in requirements.txt and added those files as well; and/orHmm. This is a consequence of #33. That could be redesigned to just be a list of pkgs to exclude in the serverless.yml file instead of as comments in requirements.txt.
Concequences of that:
-r line in requirements.txt like in this PRcc @medwig
The other option is to go back to @medwig's initial implementation of #33 which dropped the .requirements.txt file in the current dir rather than with out the . into .serverless.
And as a temporary workaround to allow you to deploy @brettdh, change it to -r ../requirements-pipenv.txt when deploying.
Thanks. I'm currently using the workaround of generating requirements.txt with a script, so that I don't have to change it when deploying vs serving locally.
FWIW, I haven't looked at the details of that PR, but at a glance it makes more sense to me to put ignore config specific to serverless-python-requirements into serverless.yml.
I've released this in version 3.0.0-beta. It's a major version because the no deploy change is a breaking change and it's a beta because @UnitedIncome is nearing a public launch so I don't wanna pull a bunch of changes into our release.