Closed frankamp closed 6 years ago
Amazon-dash has not been tested on OS X. The Amazon-dash installer does not support OSX. The installer is for Linux so you can ignore the installation step.
It has now and it works great! I made it turn on my spotify on my machine for fun. With a couple of tweaks and a bit of docs, it would be usable by a lot of devs.
In a next version I will make sure that there is no error in the installation process. Thank you.
Does it work in OS X then? Does the discovery command work for you?
Yep! I had a dash button make spotify play (using hnarayanan/shpotify cli project).
Thank you :)
Can you please give me the exception traceback of this code in OSX?
(not os.getuid() and not only_root_write(file)) or oth_w_perm(file):
Traceback (most recent call last):
File "/usr/local/bin/amazon-dash", line 6, in
On Wed, Jul 18, 2018 at 11:04 AM, Nekmo notifications@github.com wrote:
Can you please give me the exception traceback of this code in OSX?
(not os.getuid() and not only_root_write(file)) or oth_w_perm(file):
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Nekmo/amazon-dash/issues/63#issuecomment-406022452, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4YTu-Qq_eXn7tUhHDOeDeFg4ccQqtkks5uH3jLgaJpZM4VU5m3 .
OK thanks. I'm going to submit a patched version in the development branch. Please tell me if it works for you.
Thanks!
On Wed, Jul 18, 2018 at 11:14 AM, Nekmo notifications@github.com wrote:
OK thanks. I'm going to launch a patched version in the development branch. Please tell me if it works for you.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Nekmo/amazon-dash/issues/63#issuecomment-406025390, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4YTsrfF88xf6PsOUJ3PXKf3LCFa7UYks5uH3sGgaJpZM4VU5m3 .
Please install It using:
pip install https://github.com/Nekmo/amazon-dash/archive/develop.zip
Remember to fix the permissions of the Amazon-dash configuration file:
chmod 660 amazon-dash.yml && chown root:root amazon-dash.yml
Thanks.
chown: root: illegal group name
this is the issue, the group on osx can't be root. If we're being this specific, wouldn't 600 suffice? Ignore the group?
On Wed, Jul 18, 2018 at 11:22 AM, Nekmo notifications@github.com wrote:
Please install It using:
pip install https://github.com/Nekmo/amazon-dash/archive/develop.zip
Remember to fix the permissions of the Amazon-dash configuration file:
chmod 660 amazon-dash.yml && chown root:root amazon-dash.yml
Thanks.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Nekmo/amazon-dash/issues/63#issuecomment-406028044, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4YTqbdfSZfCGV3xg_WQh6C-JtJ48bUks5uH3z9gaJpZM4VU5m3 .
Yes, change chmod 660 amazon-dash.yml
to chmod 600 amazon-dash.yml
and chown root:root amazon-dash.yml
to chown root amazon-dash.yml
Ok pip install goes:
error in amazon-dash setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in scapy;python_version<"3.0" at ;python_version<"3.0"
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/2g/5dgtldh178x86fr0zrc09kf40000gp/T/pip-iqjbSG-build/
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.```
I just launched a new release. I'm going to check it, thanks.
Please run in your system:
easy_install --version
➜ tmpluceedockerwgroovy python --version Python 2.7.10 ➜ tmpluceedockerwgroovy easy_install --version
setuptools 18.0.1 ➜ tmpluceedockerwgroovy pip --version pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
On Wed, Jul 18, 2018 at 4:30 PM, Nekmo notifications@github.com wrote:
Please run in your system:
easy_install --version
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Nekmo/amazon-dash/issues/63#issuecomment-406105680, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4YTogGe2vIopf4_XyG2MtLLtQVG09dks5uH8UkgaJpZM4VU5m3 .
Your Setuptools version is old (24 Jun 2015), you can upgrade It using:
pip install -U setuptools
Thanks for notifying.
sudo pip install https://github.com/Nekmo/amazon-dash/archive/develop.zip
Password:
The directory '/Users/jfrankamp/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/jfrankamp/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting https://github.com/Nekmo/amazon-dash/archive/develop.zip
Downloading https://github.com/Nekmo/amazon-dash/archive/develop.zip
/ 1.4MB 4.4MB/s
Requirement already satisfied: PyYAML>=3.0 in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: jsonschema in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: requests in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: click in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: click-default-group in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: scapy in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: subprocess32 in /usr/local/lib/python2.7/site-packages (from amazon-dash==1.1.0)
Requirement already satisfied: functools32; python_version == "2.7" in /usr/local/lib/python2.7/site-packages (from jsonschema->amazon-dash==1.1.0)
Installing collected packages: amazon-dash
Running setup.py install for amazon-dash ... done
Successfully installed amazon-dash-1.1.0
then to run
➜ ~ chown root amazon-dash.yml
➜ ~ sudo chmod 600 amazon-dash.yml
➜ ~ sudo amazon-dash
Welcome to Amazon-dash v1.1.0 using Python 2.7.10
Listening for events. Amazon-dash will execute the events associated with the registered buttons.
ifconfig: interface vboxnet does not exist
ifconfig: interface vboxnet does not exist
ifconfig: interface vboxnet does not exist
(daemon running)
hit the Cascade button and spotify played my song.
Thanks! Looks good!
Thanks for your help :)
Description
I tried to run this on OSX. It errors during the install step trying to determine whether I have systemd and during the run step trying to write an error message about the write permissions of the config file, because root is not a valid group.
What I Did
During install it bombs here:
return check_output(['ps', '--no-headers', '-o', 'comm', '1']).strip(b'\n ').decode('utf-8')
So I commented out line 99 in the init of the
install
path re:#if get_init_system() != 'systemd' or not get_systemd_services_path():
which makes it just raise an exceptionraise IsInstallableException('Systemd is not available')
. This is fine though, because that exception is still a successful installation path re: "You must run it manually". I'm just developing on this machine, I'll run everything manually.Then I discovered my dash button mac, and wrote a config file.
When I ran it, it complained about being unable to read a group, which turns out to be in the error handling code. I don't think I care about file permissions at all, least of all write perms. Maybe this should just be a warning?
I commented out all the write permissions error code
It works fine.
Thanks for the program yo.