Skip to content
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

parse_requirements requires a session argument #11

Open
fiatjaf opened this issue Feb 28, 2015 · 1 comment
Open

parse_requirements requires a session argument #11

fiatjaf opened this issue Feb 28, 2015 · 1 comment

Comments

@fiatjaf
Copy link

fiatjaf commented Feb 28, 2015

When installing a package whose setup.py was made with pip-init on Heroku, this happens:

         Downloading went-0.0.1.tar.gz
           Traceback (most recent call last):
             File "<string>", line 20, in <module>
             File "/tmp/pip-build-S8sOPu/went/setup.py", line 7, in <module>
               install_requires = [str(r.req) for r in requirements]
             File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
               "parse_requirements() missing 1 required keyword argument: "
           TypeError: parse_requirements() missing 1 required keyword argument: 'session'
           Complete output from command python setup.py egg_info:
           Traceback (most recent call last):

             File "<string>", line 20, in <module>

             File "/tmp/pip-build-S8sOPu/went/setup.py", line 7, in <module>

               install_requires = [str(r.req) for r in requirements]

             File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements

               "parse_requirements() missing 1 required keyword argument: "

           TypeError: parse_requirements() missing 1 required keyword argument: 'session'

           ----------------------------------------
           Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-S8sOPu/went

This seems to be true for newer versions of pip. However, the following line made it work:

import pip
requirements = parse_requirements("requirements.txt", session=pip.download.PipSession())

Based on jmcarp/robobrowser#32

@juanpabloaj
Copy link
Owner

@fiatjaf to generate a more simple setup.py file, in the last versions of pip-init, I removed the line with parse_requirements.

by the way, maybe you like this post about the requirements.txt file.

https://caremad.io/2013/07/setup-vs-requirement/

lfalvarez pushed a commit to ciudadanointeligente/ddah-promises that referenced this issue Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants