I am using
install_requires = [str(ir.req) for ir in parse_requirements("requirements.txt", session=PipSession())]
pip install .. However, this does not seem to work with a requirements.txt that looks like this:
(support for --trusted-host was added in pip8.0.0). The install from blah fails because it complains about it not being an untrusted host as if it never processed the first line.
pip install -r requirements.txt works perfectly, so these options are correct.
This means there is something
parse_requirements is not doing. My question is: how do I fix or work around this using only
pip install .? I could do something horrendous like:
os.system(pip install -r requirements.txt)
in the setup.py file.
The implicit coupling of requirements.txt and setup.py is confusing to me. Nothing in setup calls requirements.txt unless you explicitly parse requirements.txt yourself, yet requirements.txt is a very standard python convention.
EDIT: We are using tools (Cloudify and sometimes Chef) that execute a
pip install .. We cannot change this. I have to get this working as a pippable package, with the --trusted-host and --extra-index-urls without using a pip.conf either. Currently we are doing the os.system trick.