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

pip install --user fix #127

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Xender
Copy link

@Xender Xender commented Feb 12, 2016

Fixes pip install --user failing with "permission denied" error when trying to copy headers (data_files) into destination place.

What failed before: pip install --user copies all Python files correctly to ~/.local/lib/python3.5/site-packages/, but then tries to copy C headers to absolute path pointed by sys.exec_prefix - which still points to system-global directory when installing with --user.

The fix: use relative paths, setup() will take care of them properly.

For reference: https://docs.python.org/3/distutils/setupscript.html#installing-additional-files

Each (directory, files) pair in the sequence specifies the installation directory and the files to install there. If directory is a relative path, it is interpreted relative to the installation prefix (Python’s sys.prefix for pure-Python packages, sys.exec_prefix for packages that contain extension modules).

Also, I needed to manually apply patches from #120 to make it build at all, but for the purpose of PR, I rebased them to master.

This allows pip install --user to install headers in ~/.local/include,
instead of trying to install them in /usr/include and fail with
"permission denied" error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant