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

Installation fails on OS X due to System Integrity Protection #6

Open
nloveladyallen opened this issue Jun 12, 2016 · 6 comments
Open

Comments

@nloveladyallen
Copy link

On OS X 10.11+, /usr (except /usr/local and a few others) is read-only. As a result, even with sudo, setup.py fails.

@ids1024
Copy link
Owner

ids1024 commented Jun 12, 2016

You could install to /usr/local with python setup.py install --prefix=/usr/local.

@nloveladyallen
Copy link
Author

Turns out it installs the command to /usr/local anyway, but completions are being installed to /usr/share. Installs correctly by replacing ('/usr/share/zsh/site-functions', ['_wikicurses']) with ('/usr/local/share/zsh/site-functions', ['_wikicurses']) in setup.py.

@ids1024
Copy link
Owner

ids1024 commented Jun 12, 2016

Ah yes, I see. I don't know if there is a good way to make setup.py support both without editing. Setuptools is not really designed for installing data files like that and does not work well for it.

@nloveladyallen
Copy link
Author

You could do something like:

if platform.system() == "darwin":
    completions = ('/usr/local/share/zsh/site-functions', ['_wikicurses'])
else:
    completions = ('/usr/share/zsh/site-functions', ['_wikicurses'])

setup(name='Wikicurses',
      # ...
      data_files = [
          # ...
          completions
          ],
      # ...
      )

@ids1024
Copy link
Owner

ids1024 commented Jun 12, 2016

That would work, but is a hack. The question is how (if possible) the code could respect --prefix.

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

No branches or pull requests

3 participants