Fix user_site failures on pypy #616

pnasrat opened this Issue Jul 29, 2012 · 8 comments

2 participants


Added pypy travis support - lots of tests in test_user_site failing!/pypa/pip/jobs/1982085

@qwcode I'm looking at today but feel free to chip in.


We use path_locations to figure out and set the attribute env.lib_dir - but virtualenv uses lib_dir = home_dir but puts no-global-site-packages.txt in site_packages_filename = join(site_dir, 'no-global-site-packages.txt')


beginning to look now...


yes, we need to change test_pip to use the same location as virtualenv.

when I built the new virtualenv_no_global() function, I was very careful to mirror how virtualenv was locating the no-global file.

#this mirrors the logic in for locating the no-global-site-packages.txt file
site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
no_global_file = os.path.join(site_mod_dir,'no-global-site-packages.txt')

but in, I had just blindly reused this line, (env.lib_path/'no-global-site-packages.txt').rm(), that I had found in a pre-existing user test. I'll fix in a pull. need to get pypy set up locally.


so I locally fixed the no-global file location issue, but it's opening up other issues with pypy apparently not supporting --user installs. I'm still analyzing....

prior to me updating the --user tests, some of the old tests were skipping for pypy like so:

    # FIXME distutils --user option seems to be broken in pypy
    if hasattr(sys, "pypy_version_info"):
        raise SkipTest()

I didn't carry that over into my tests. skipping may end up being the answer, but let me confirm exactly what is wrong with pypi and --user installs, and report back.

I couldn't find any open bugs about --user on pypy's bug tracker


I tried a --user install using a minimal distutils package pypy install --user and encountered a bug.
I might do a pull request to pypy later to fix this, but for now will add a skip for any --user tests under pypy.

pull coming later, after I try to sort out the the other pypy failures.


Great - lets ensure we have a bug filed for fixing --user in pypy

@pnasrat pnasrat closed this Jul 30, 2012
@pnasrat pnasrat reopened this Jul 30, 2012

Actually just keep this bug for that.


hey @pnasrat , if you don't mind, created a specific "workaround" bug for the disabling of the --user tests for pypy.
going to create a few other workaround bugs to track the other workarounds that I'm finding in the code.

@qwcode qwcode closed this Aug 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment