jaraco / pip-run

pip-run - dynamic dependency loader for Python
MIT License
135 stars 20 forks source link

Add support for other PIP parameters in script inference #19

Closed jaraco closed 7 years ago

jaraco commented 7 years ago

One key feature of rwt is that it can be readily used on a single script to resolve dependencies declared in the script and install them, using the setuptools convention of __requires__. This convention, however, does not allow for other options to install, such as the ever-important --index-url. There should be another, comparable mechanism for a script to declare other parameters to pip.

jaraco commented 7 years ago

I was thinking of using a syntax like

__requires__ = ['foo']
__requires__.index_url = 'https://my.private.index'

which would nicely namespace the options that might be specified. However, that syntax isn't executable Python as simple lists have a fixed set of attributes.

So now I'm thinking this:

__requires__ = ['foo']
__index_url__ = 'https://my.private.index/'