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

Issue with poetry and editable dependencies

Open nat-e opened this issue 7 years ago • 2 comments

Hello, I'm getting the following error when deploying an app with poetry that has an editable dependency on another local package

    ERROR: Complete output from command /var/lang/bin/python3.6 -c 'import setuptools, tokenize;__file__='"'"'/app/tintlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --home=/tmp/pip-target-dvzgxbfh:
    ERROR: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --home not recognized

My current workaround is to set usePoetry: false in serverless.yml and do the following:

poetry export --without-hashes -f requirements.txt
sed 's/-e //g' requirements.txt > requirements2.txt
mv requirements2.txt requirements.txt
sls deploy

Thanks!

nat-e avatar Jul 05 '19 14:07 nat-e

Likely will be fixed by ~#362~ #390

tpansino avatar Jul 25 '19 04:07 tpansino

#390 is merged; happy to reopen if the bug is persisting.

bsamuel-ui avatar Feb 19 '20 16:02 bsamuel-ui