title: How to add a package-specific index-url to requirements.txt?
body: <p>I want to add a package to my <code>requirements.txt</code> that would correspond to the command line</p>
  
  <pre><code>pip3 install foo --index-url https://foo.com/bar/baz
  </code></pre>
  
  <p>I <em>appended</em> </p>
  
  <pre><code>--index-url https://foo.com/bar/baz
  foo
  </code></pre>
  
  <p>to the <em>end</em> of <code>requirements.txt</code> in the hope that the <code>index-url</code> option will affect only things that come after it. It seems to work (at least as long as I am on the VPN from which <code>foo.com</code> is visible).</p>
  
  <p>Is this the right approach?
  Thanks.</p>