From c45c23ae6fecb7594bd3726b2720e0370d3a5cfb Mon Sep 17 00:00:00 2001 From: kevgliss Date: Sun, 9 Oct 2016 00:05:50 -0700 Subject: [PATCH] Detect root (#440) * Closes #430 --- .travis.yml | 8 ++++++-- Makefile | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4caacda2..336db5e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ -sudo: false - language: python +sudo: required +dist: trusty + +node_js: + - "4.2" addons: postgresql: "9.4" @@ -24,6 +27,7 @@ env: before_script: - psql -c "create database lemur;" -U postgres - psql -c "create user lemur with password 'lemur;'" -U postgres + - npm config set registry https://registry.npmjs.org - npm install -g bower script: diff --git a/Makefile b/Makefile index aeb7a40c..e9e96b7c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ NPM_ROOT = ./node_modules STATIC_DIR = src/lemur/static/app +USER := $(shell whoami) + develop: update-submodules setup-git @echo "--> Installing dependencies" +ifeq ($(USER), root) + @echo "WARNING: It looks like you are installing Lemur as root. This is not generally advised." + npm install --unsafe-perm +else npm install +endif pip install "setuptools>=0.9.8" # order matters here, base package must install first pip install -e . @@ -82,4 +89,4 @@ coverage: develop publish: python setup.py sdist bdist_wheel upload -.PHONY: develop dev-postgres dev-docs setup-git build clean update-submodules test testloop test-cli test-js test-python lint lint-python lint-js coverage publish \ No newline at end of file +.PHONY: develop dev-postgres dev-docs setup-git build clean update-submodules test testloop test-cli test-js test-python lint lint-python lint-js coverage publish