Serverless-python-requirements: editable flags -e in requirements.txt don't work

Created on 21 Jun 2017  路  5Comments  路  Source: UnitedIncome/serverless-python-requirements

requirements.txt

-e git+git://github.com/ojii/pymaging.git#egg=pymaging
-e git+git://github.com/ojii/pymaging-png.git#egg=pymaging-png

throws error:

Serverless: Installing required Python packages for runtime python2.7...

  Error --------------------------------------------------

  Command "/Users/stephanemaarek/.pyenv/versions/2.7.12/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/blah/projects/python-s3-thumbnail/src/pymaging/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" --no-user-cfg develop --no-deps --home=/var/folders/x5/gcz23y8x62v7v2bx49rt00wr0000gn/T/tmpGP7oYR" failed with error code 1 i

tried both with and without docker

bug confirmed good first PR

Most helpful comment

removing -e fixes the problem as a temporary fix

All 5 comments

removing -e fixes the problem as a temporary fix

Just wanted to add that pipenv also does not work for git due to the requirements.txt generated by pipenv having the -e flag.

For anyone needing a workaround for SSH access to GitHub, use the format git+ssh://[email protected]/$org/$repo.git#egg=$egg.

@simplesteph thanks for this tip - worked for me.

Looking at the logic in lib/pip.js in detail, it seems only options starting with -- as well as -i and -f are respected.
https://github.com/UnitedIncome/serverless-python-requirements/blob/master/lib/pip.js#L391

I'll create a PR to fix that, but as a workaround you can just use --editable instead of -e:
https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format

I'll create a PR to fix that, but as a workaround you can just use --editable instead of -e

@jacksgt We'll be on the lookout for it! Please consider adding a test case as a separate commit, so we can rework it when #482 is merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doublemarked picture doublemarked  路  3Comments

jnicho02 picture jnicho02  路  6Comments

brettdh picture brettdh  路  5Comments

amitm02 picture amitm02  路  5Comments

davegravy picture davegravy  路  5Comments