-
Notifications
You must be signed in to change notification settings - Fork 53
Installing from github or local checkout (non root installation)
This page describes how you can install udiskie into a virtual environment (no root permissions required). This is useful to quickly test new development branches or the most recent master commit without having to install udiskie on the system level. This article is mainly targeted at users of archlinux but may be useful for others as well.
First, install udiskie's dependencies. This can be done by first installing udiskie from the archlinux community package and then immediately uninstalling it but leaving its dependencies:
sudo pacman -S udiskie
sudo pacman -R udiskie
If you want to do it the hard way:
# minimum requirements:
sudo pacman -S udisks2 python-gobject
# recommended:
sudo pacman -S gtk3 libnotify gettext
# a notification daemon (if you haven't already)
sudo pacman -S xfce4-notifyd
If you have a system-level udiskie installation, remove it to make ensure that the local version will be loaded instead of the global one. I can't reproduce this issue right now, but I believe this has happened to me a few times. On archlinux:
sudo pacman -R udiskie
sudo pip uninstall udiskie
If not already installed, get virtualenv:
sudo pacman -S python-virtualenv
Now we finally get to working with commands that do not require any root access anymore. First, create and activate a virtualenv as follows:
virtualenv TESTENV --system-site-packages
source TESTENV/bin/activate
Install the following python packages (optional):
pip install keyutils # for caching passwords
Reactivate the virtualenv if you deactivated it or opened a new terminal session:
source TESTENV/bin/activate
Now there are several options, depending on your needs.
-
To instruct your python to load udiskie from a local working directory every time (i.e. any changes you make to the code will be visible immediately without re-installing), proceed as follows:
git clone git://github.com/coldfix/udiskie -b master cd udiskie python setup.py develop
-
If you want to have a static udiskie installation from a local checkout (i.e. changes will not be visible until you update/re-install udiskie):
git clone git://github.com/coldfix/udiskie -b master cd udiskie python setup.py develop
-
To install udiskie directly from github without adding a local checkout, type:
pip install git+git://github.com/coldfix/udiskie@master
In new terminal sessions don't forget to activate the virtualenv, then just type:
udiskie