Tigge / openant

ANT and ANT-FS Python Library
MIT License
174 stars 80 forks source link

comment de udev section to pass the setup.py #16

Closed clemaitre58 closed 7 years ago

clemaitre58 commented 8 years ago

Here some changes in order to install properly when you use anaconda python distribution.

without this comment in the setup.py (udev), you can't install with sudo python setup.py install. In fact, the installer select system python and the anaconda python.

So the solution is :

sudo cp resources/ant-usb-sticks.rules /etc/udev/rules.d sudo udevadm control --reload-rules sudo udevadm trigger --subsystem-match=usb --attr-match=idVendor=0fcf --action=add

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 51.621% when pulling d6ca3137ba2a7fae6d3c1115339be6f72059a575 on clemaitre58:master into ba4c276fec0be36ab27e4b727a29836d368b59a6 on Tigge:master.

Tigge commented 8 years ago

Hi! Unfortunately this will break most other distributions which then all would have to rely on manually installing the udev rules. Is there perhaps another solution to make this work that will not remove existing functionality from other distributions?

glemaitre commented 8 years ago

What about calling the udev install using os.system('sudo whatever_command'). It will call the default python - conda for anaconda user and system for whatever distribution - and will ask for the super user password at install time.

ironhouzi commented 6 years ago

A non-ideal workaround is to use sudo -E python setup.py install. Copies the udev rules, but litters your virtualenv directory with a few root owned files (PKG-INFO and txt-files).