mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
setup.py: run npm with --unsafe-perm
this is the equivalent to bower's `--allow-root` that we had in bower-proper fixes issues when installing jupyterhub from source with sudo
This commit is contained in:
@@ -52,8 +52,7 @@ ENV PATH=/opt/conda/bin:$PATH
|
|||||||
ADD . /src/jupyterhub
|
ADD . /src/jupyterhub
|
||||||
WORKDIR /src/jupyterhub
|
WORKDIR /src/jupyterhub
|
||||||
|
|
||||||
RUN npm install --unsafe-perm && \
|
RUN pip install . && \
|
||||||
pip install . && \
|
|
||||||
rm -rf $PWD ~/.cache ~/.npm
|
rm -rf $PWD ~/.cache ~/.npm
|
||||||
|
|
||||||
RUN mkdir -p /srv/jupyterhub/
|
RUN mkdir -p /srv/jupyterhub/
|
||||||
|
8
setup.py
8
setup.py
@@ -121,12 +121,6 @@ from distutils.command.build_py import build_py
|
|||||||
from distutils.command.sdist import sdist
|
from distutils.command.sdist import sdist
|
||||||
|
|
||||||
|
|
||||||
npm_path = os.pathsep.join([
|
|
||||||
pjoin(here, 'node_modules', '.bin'),
|
|
||||||
os.environ.get("PATH", os.defpath),
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
def mtime(path):
|
def mtime(path):
|
||||||
"""shorthand for mtime"""
|
"""shorthand for mtime"""
|
||||||
return os.stat(path).st_mtime
|
return os.stat(path).st_mtime
|
||||||
@@ -174,7 +168,7 @@ class NPM(BaseCommand):
|
|||||||
return
|
return
|
||||||
|
|
||||||
print("installing js dependencies with npm")
|
print("installing js dependencies with npm")
|
||||||
check_call(['npm', 'install', '--progress=false'], cwd=here, shell=shell)
|
check_call(['npm', 'install', '--progress=false', '--unsafe-perm'], cwd=here, shell=shell)
|
||||||
os.utime(self.node_modules)
|
os.utime(self.node_modules)
|
||||||
|
|
||||||
os.utime(self.bower_dir)
|
os.utime(self.bower_dir)
|
||||||
|
Reference in New Issue
Block a user