FS#299 - make install-event-manager fails without root privileges
|
DetailsWhen installing as a local user (e.g. with make PREFIX=~), make install-event-manager fails because only --install-scripts is set to $(INSTALLDIR), but the python packages to to the default location (ususally something like /usr/lib or /usr/local/lib). Setting --prefix fixes this. Patch:
diff --git a/Makefile b/Makefile index 214a2e4..470537e 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,7 @@ install-uzbl-core: all install-dirs install -m755 uzbl-core $(INSTALLDIR)/bin/uzbl-core install-event-manager: install-dirs - $(PYTHON) setup.py install --install-scripts=$(INSTALLDIR)/bin $(PYINSTALL_EXTRA) + $(PYTHON) setup.py install --prefix=${PREFIX} --install-scripts=$(INSTALLDIR)/bin $(PYINSTALL_EXTRA) install-uzbl-browser: install-dirs install-uzbl-core install-event-manager sed 's#^PREFIX=.*#PREFIX=$(RUN_PREFIX)#' < bin/uzbl-browser > $(INSTALLDIR)/bin/uzbl-browser |
This task depends upon
--- Makefile.old 2012-07-24 12:29:28.896698534 +0000
+++ Makefile 2012-07-24 14:29:52.805673036 +0000
@@ -182,7 +182,7 @@
install -m755 uzbl-core $(INSTALLDIR)/bin/uzbl-core
install-event-manager: install-dirs
- $(PYTHON) setup.py install --install-scripts=$(INSTALLDIR)/bin $(PYINSTALL_EXTRA)
+ $(PYTHON) setup.py install --prefix=${INSTALLDIR} --install-scripts=$(INSTALLDIR)/bin $(PYINSTALL_EXTRA)
install-uzbl-browser: install-dirs install-uzbl-core install-event-manager
sed 's#^PREFIX=.*#PREFIX=$(RUN_PREFIX)#' < bin/uzbl-browser > $(INSTALLDIR)/bin/uzbl-browser
...
running install
running build
running build_py
running build_scripts
running install_lib
copying build/lib/uzbl/plugins/mode.py -> /usr/lib/python3.3/site-packages/uzbl/plugins
error: could not delete '/usr/lib/python3.3/site-packages/uzbl/plugins/mode.py': Permission denied
make: *** [install-event-manager] Error 1
That is, make tries to access the real thing, and not the local package directory.
Again, this works if $INSTALLDIR is used instead of $PREFIX.