reynoldsnlp / pipster

pipster: The pythonic way to `pip install`.
MIT License
8 stars 2 forks source link

Handle all boolean options as tri-state values #6

Closed ncoghlan closed 5 years ago

ncoghlan commented 5 years ago

At time of filing, all boolean options are being handled such that passing even --user=False will still set the user flag.

5 proposes changing that so all false vales are handled as "don't pass the given argument", but that isn't good for cases like --use-pep517 where it would be really nice to handle that as:

One possible way to achieve that would be to make it so that all boolean options were handles as being tri-value (at the API level) from the start, such that:

Given that model, the wrapper would then also intercept all keywords starting with no_ and advise flipping them to their tri-state counterpart:

ncoghlan commented 5 years ago

Checking https://pip.pypa.io/en/stable/reference/pip_install/#options for any other design constraints:

I'll amend #5 on that basis.

ncoghlan commented 5 years ago

5 has been updated to match the above description now. I didn't end up disallowing U=False explicitly - instead, it gets translated to --no-U, which pip will reject as an unknown option.

reynoldsnlp commented 5 years ago

Fixed by https://github.com/reynoldsnlp/pip_inside/pull/5