Join GitHub today
No way to alter root directory #253
Problem: Passing the --root option to the setup script via the --install-option option causes pip installation to break.
Reason: pip uses the --record setup script option to determine which files were installed, however this always returns paths relative to the root directory. When it then attempts to modify the egg-info directory it fails as it is unaware of the real system path it needs to be located under.
Significance: The reason why --root is important is because compiled modules would otherwise contain references to the full path name which is undesirable.
Solution: There's two fixes I can see:
@carljm Ok, point taken, though, it is a bug, and, a year is a year.
While trying to add @hetmankp changes and running the test suite I'm getting a bunch of errors from the tests.
So what version of Mock are you using to test pip, and also, is there any sys path magic whlie running the tests? Because, although on a virtualenv, I do have scripttest installed.
Pip has lots of bugs (given the "foundation" of distutils and setuptools, and all the weird edge cases in packaging, it's not likely to ever be otherwise), and nobody's paid to work on it. Priority goes to pull requests with passing tests. Thanks for helping out!
Might be good to first try running the tests without the patch and make sure you can get a clean run. I've never seen a scripttest import error, and there's no