serverless-python-requirements
serverless-python-requirements copied to clipboard
Issue with poetry and editable dependencies
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!
Likely will be fixed by ~#362~ #390
#390 is merged; happy to reopen if the bug is persisting.