mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
don't need to walk npm bin dirs
use node_modules/.bin
This commit is contained in:
16
setup.py
16
setup.py
@@ -111,14 +111,10 @@ from distutils.command.build_py import build_py
|
||||
from distutils.command.sdist import sdist
|
||||
|
||||
|
||||
def npm_path():
|
||||
"""PATH plus local npm package bins (less, bower)
|
||||
|
||||
callable because `npm install` may not have been called yet
|
||||
"""
|
||||
node_bins = glob(pjoin(here, 'node_modules', '*', 'bin'))
|
||||
PATH = os.environ.get("PATH", os.defpath)
|
||||
return ':'.join(node_bins + [PATH])
|
||||
npm_path = ':'.join([
|
||||
pjoin(here, 'node_modules', '.bin'),
|
||||
os.environ.get("PATH", os.defpath),
|
||||
])
|
||||
|
||||
|
||||
def mtime(path):
|
||||
@@ -173,7 +169,7 @@ class Bower(BaseCommand):
|
||||
os.utime(self.node_modules)
|
||||
|
||||
env = os.environ.copy()
|
||||
env['PATH'] = npm_path()
|
||||
env['PATH'] = npm_path
|
||||
|
||||
try:
|
||||
check_call(
|
||||
@@ -228,7 +224,7 @@ class CSS(BaseCommand):
|
||||
sourcemap = style_css + '.map'
|
||||
|
||||
env = os.environ.copy()
|
||||
env['PATH'] = npm_path()
|
||||
env['PATH'] = npm_path
|
||||
try:
|
||||
check_call([
|
||||
'lessc', '--clean-css',
|
||||
|
Reference in New Issue
Block a user