Throws a CommandError if combined with the --local flag.
Adds a further "user_only" filter to util.get_installed_distibutions.
By default (without the presence of the --user flag) the filter if off.
in virtualenvs that have global access, they also have access to the user site.
so, I could imagine wanting some way to get the virtualenv packages and the user packages, but excluding all the global stuff.
Yeah I'm not really sure the ins & outs of virtualenvs. What do you suggest changing here?
1) change get_installed_distributions so that it has a different OR check when both local_only and user_only are provided.
2) throw a commanderror when someone tries to pass --user and location.virtualenv_no_global() is true. i.e. when you're in a no-global virtualenv, you have no visibility to the user site. Or better, don't even add the --user option when that's true.
can you update tests.test_utils.Tests_get_installed_distributions ?
I'm looking at adding the tests - but am unfamiliar with mock & co… so it's going to take a while.
Added unit tests.
But the build fails since travis does not expose user packages under it's virtualenv. How do we verify that it works?
Yeah not sure... Might be one of those things that could be untestable?
@schwa Try to contact travis ci support and see if they can help.
Any news on the travis testing problem? Is there anything I can do to get this pull request done?
@qwcode @jezdez Help?
the test is using reset_env (which creates an isolated scripttest environment) which supports --user installs (by manipulating PYTHONUSERBASE), so no need to be concerned with travis support on this.
the fix is to do this reset_env(system_site_packages=True) to make the the user site visible in the virtualenv created by reset_env.
as for getting this merged, I intend to merge a number of --user related changes/fixes for 1.5, so I will get to this.
@schwa Could you please fix the test according to @qwcode findings?
Finally updated the pull request as per @qwcode
@schwa You might have forgotten to import reset_env.
The information at the top says "0 additions, 0 deletions". Why is that? What happend to the patch?
I didn't merge this. github quirk. looks like @schwa updated his develop branch.
better to submit PRs from a non-develop branch.
Thanks for clarifying this. My first thought was that the feature had been added. Is such a feature still of interest?
I am not the creator of this ticket. But I switched from the user scheme, to virtualenv in $HOME. For me this can be left closed.