Simplified install process on Mac
(cherry picked from commit 726eec8)
This commit is contained in:
parent
20cd13904d
commit
b1057a4cc8
4 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -50,6 +50,9 @@ INSTALL_REQUIRES = [
|
|||
"websocket-client>=0.40,<0.41"
|
||||
]
|
||||
|
||||
if sys.platform == "darwin":
|
||||
INSTALL_REQUIRES.append("appdirs>=1.4.0")
|
||||
|
||||
# Additional requirements for optional install options
|
||||
EXTRA_REQUIRES = dict(
|
||||
# Dependencies for developing OctoPrint
|
||||
|
|
|
|||
|
|
@ -1490,12 +1490,8 @@ class Settings(object):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue