pypa/virtualenv — pull request #318 by avalentino (2012-08-17 16:15:41+00:00)
Title: Fix paths of users' site-packages on OSX

I have virtualenv installed with the option ˆ--userˆ on OSX Mountain Lion.
Files are located in ˆ$HOME/Library/Python/2.7/lib/python/site-packages'ˆ

Trying to create a new environment I get the following error:

```
$ virtualenv testenv
Traceback (most recent call last):
File "/Users/antonio/Library/Python/2.7/bin/virtualenv", line 9, in
load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')()
File "/Users/antonio/Library/Python/2.7/lib/python/site-packages/virtualenv.py", line 942, in main
never_download=options.never_download)
File "/Users/antonio/Library/Python/2.7/lib/python/site-packages/virtualenv.py", line 1043, in create_environment
site_packages=site_packages, clear=clear))
File "/Users/antonio/Library/Python/2.7/lib/python/site-packages/virtualenv.py", line 1188, in install_python
copy_required_modules(home_dir)
File "/Users/antonio/Library/Python/2.7/lib/python/site-packages/virtualenv.py", line 1140, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "/Users/antonio/Library/Python/2.7/lib/python/site-packages/virtualenv.py", line 1115, in change_prefix
(filename, prefixes)
AssertionError: Filename /Users/antonio/Library/Python/2.7/lib/python/site-packages/readline.so does not start with any of these prefixes: ['/System/Library/Frameworks/Python.framework/Versions/2.7', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Users/antonio/projects/~/Library/Python/2.7/site-packages']
```

This pull request fixes this issue.