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

Simplified install process on Mac #1705

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@noahsmartin
Copy link
Contributor

commented Jan 11, 2017

I was trying to install OctoPrint on macOS by following the steps in the README when I ran into the problem "No module named AppKit", the same as here: #1565. It turns out OctoPrint was using NSSearchPathForDirectoriesInDomains from AppKit to get the Application Support directory. This required an extra step of installing pyobjc.

However, pyobjc isn't that easy to install now because of System Integrity Protection (http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade). Hopefully Mac users could get OctoPrint set up without this extra step at all. So I decided to simplify and use appdirs (https://pypi.python.org/pypi/appdirs) instead. This can be installed easily in setup.py and does exactly what we need by finding the same Application Support directory.

After this change I was able to install and run OctoPrint on my Mac.

@foosel

This comment has been minimized.

Copy link
Owner

commented Jan 12, 2017

Hm.. Can we wrap this additional dependency into a platform specific check so it only gets installed on Macs? Most common OS for running OctoPrint on is Linux, so I'd rather avoid always pulling in a Mac-specific dependency.

Something like a simple if sys.platform == "darwin" in setup.py extending the requirements should probably already do it. I can't test that myself though since I don't have access to a Mac anymore.

@noahsmartin noahsmartin force-pushed the noahsmartin:nm/macInstall branch from 36b6e30 to 726eec8 Jan 12, 2017

@noahsmartin

This comment has been minimized.

Copy link
Contributor Author

commented Jan 12, 2017

Yeah I like that idea, updated the commit. I also tested this on 10.12.1 and 10.11.6

@foosel

This comment has been minimized.

Copy link
Owner

commented Jan 13, 2017

Great! I've cherry picked this on maintenance, I think it merits a fast release to the public :) It will be part of 1.3.1.

Since Github won't pick up on this cherry-pick-based merge, you'll get a "closed" message instead of a "merged" message, please don't be alarmed by this.

I also took the liberty and added your name to the list of authors.

Thanks!

@foosel foosel closed this Jan 13, 2017

@noahsmartin noahsmartin deleted the noahsmartin:nm/macInstall branch Jan 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.