Skip to content

Plugin doesn't seem to support -r in requirements.txt #57

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

Closed
brettdh opened this issue Aug 18, 2017 · 5 comments
Closed

Plugin doesn't seem to support -r in requirements.txt #57

brettdh opened this issue Aug 18, 2017 · 5 comments
Labels

Comments

@brettdh
Copy link

brettdh commented Aug 18, 2017

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:

  1. Auto-discovered -r lines in requirements.txt and added those files as well; and/or
  2. Allowed me to explicitly configure what files to include
@dschep dschep added the bug label Aug 18, 2017
@dschep
Copy link
Contributor

dschep commented Aug 18, 2017

Hmm. 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:

  • Fixes this bug
  • makes the the deploy omissions apply to any pkgs included with a -r line in requirements.txt like in this PR
  • doesn't omit dependencies of packages omitted

cc @medwig

@dschep
Copy link
Contributor

dschep commented Aug 18, 2017

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.

@brettdh
Copy link
Author

brettdh commented Aug 18, 2017

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.

@brettdh
Copy link
Author

brettdh commented Aug 18, 2017

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.

dschep added a commit that referenced this issue Aug 19, 2017
dschep added a commit that referenced this issue Aug 19, 2017
@dschep dschep closed this as completed in 3b947d1 Aug 23, 2017
dschep added a commit that referenced this issue Aug 23, 2017
@dschep
Copy link
Contributor

dschep commented Aug 24, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants