serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

Specify output target for requirements

Open jamesryanbell opened this issue 6 years ago • 1 comments

Is it possible to specify which folder the injected requirements end up in? For example:

├── function1
│      ├── requirements.txt
│      ├── libraries <-- requirements would be injected here
│      └── index.py

Thanks, James

jamesryanbell avatar Apr 02 '19 10:04 jamesryanbell

For Serverless scaleway it's need to overide destination of requirement to other other folder package. Currently https://github.com/serverless/serverless-python-requirements/blob/4c576345588bcf85d2d85ab5c2a6e7eea9ebb8fa/lib/pip.js#L163

and https://github.com/serverless/serverless-python-requirements/blob/4c576345588bcf85d2d85ab5c2a6e7eea9ebb8fa/lib/pip.js#L186

force destination and unauthorize usage of

pipCmdExtraArgs:
 - --target

Simply add options pipTarget with default '' and update two lines with concat.

Ping : @scaleway

davaxi avatar Nov 04 '21 14:11 davaxi