Skip to content

Commit

Permalink
Simplified install process on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
noahsmartin committed Jan 11, 2017
1 parent 72f3fa6 commit 36b6e30
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions THIRDPARTYLICENSES.md
Expand Up @@ -55,3 +55,4 @@
* [SockJS-Tornado](http://github.com/mrjoes/sockjs-tornado/): MIT
* [Tornado](http://www.tornadoweb.org/): Apache License 2.0
* [watchdog](http://github.com/gorakhargosh/watchdog): Apache License 2.0
* [appdirs](http://github.com/ActiveState/appdirs): MIT
1 change: 0 additions & 1 deletion docs/development/index.rst
Expand Up @@ -145,7 +145,6 @@ You'll need a user account with administrator privileges.
cd OctoPrint
virtualenv venv
source venv/bin/activate
pip install -U pyobjc
pip install -e .[develop]
You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -44,7 +44,8 @@
"chainmap>=1.0.2,<1.1",
"future>=0.15,<0.16",
"scandir>=1.3,<1.4",
"websocket-client>=0.40,<0.41"
"websocket-client>=0.40,<0.41",
"appdirs>=1.4.0"
]

# Additional requirements for optional install options
Expand Down
8 changes: 2 additions & 6 deletions src/octoprint/settings.py
Expand Up @@ -1487,12 +1487,8 @@ def saveScript(self, script_type, name, script):
def _default_basedir(applicationName):
# taken from http://stackoverflow.com/questions/1084697/how-do-i-store-desktop-application-data-in-a-cross-platform-way-for-python
if sys.platform == "darwin":
from AppKit import NSSearchPathForDirectoriesInDomains
# http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSearchPathForDirectoriesInDomains
# NSApplicationSupportDirectory = 14
# NSUserDomainMask = 1
# True for expanding the tilde into a fully qualified path
return os.path.join(NSSearchPathForDirectoriesInDomains(14, 1, True)[0], applicationName)
from appdirs import *
return user_data_dir(applicationName, "")
elif sys.platform == "win32":
return os.path.join(os.environ["APPDATA"], applicationName)
else:
Expand Down

0 comments on commit 36b6e30

Please sign in to comment.