Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give precedence to --extra-search-dir paths when finding distribute/setuptools #193

merged 2 commits into from Nov 30, 2011


Copy link

ejucovy commented Nov 30, 2011

Currently the first matching setuptools/distribute package is installed by virtualenv. Since --extra-search-dir paths are appended to the search_dirs list, this means that the default search_dirs (virtualenv_support etc) always have precedence over the user-provided search dirs.

The opposite seems like it would be more useful, since it would allow a user to circumvent the default installations without needing to dig through system files and delete virtualenv_support directories. See #181 for an example where someone tried to do exactly this, but failed because of the current behavior.

…able search_dirs, so that --extra-search-dir paths will take precedence over packages found in the default search dirs
Copy link

carljm commented Nov 30, 2011

Thanks for the analysis on this. Wouldn't the code be a bit more straightforward if you just iterated over reversed(dirs) and returned the first one found, rather than having to bother with the if len / negative index business?

Copy link
Contributor Author

ejucovy commented Nov 30, 2011

Heh. Whoops, yes, that would definitely be more straightforward. I made the change you suggest in 39b98cd (should be attached to this pull request now)

carljm pushed a commit that referenced this pull request Nov 30, 2011
Give precedence to --extra-search-dir paths when finding distribute/setuptools
@carljm carljm merged commit f95e30b into pypa:develop Nov 30, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.