mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 18:14:10 +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
|
from distutils.command.sdist import sdist
|
||||||
|
|
||||||
|
|
||||||
def npm_path():
|
npm_path = ':'.join([
|
||||||
"""PATH plus local npm package bins (less, bower)
|
pjoin(here, 'node_modules', '.bin'),
|
||||||
|
os.environ.get("PATH", os.defpath),
|
||||||
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])
|
|
||||||
|
|
||||||
|
|
||||||
def mtime(path):
|
def mtime(path):
|
||||||
@@ -173,7 +169,7 @@ class Bower(BaseCommand):
|
|||||||
os.utime(self.node_modules)
|
os.utime(self.node_modules)
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['PATH'] = npm_path()
|
env['PATH'] = npm_path
|
||||||
|
|
||||||
try:
|
try:
|
||||||
check_call(
|
check_call(
|
||||||
@@ -228,7 +224,7 @@ class CSS(BaseCommand):
|
|||||||
sourcemap = style_css + '.map'
|
sourcemap = style_css + '.map'
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['PATH'] = npm_path()
|
env['PATH'] = npm_path
|
||||||
try:
|
try:
|
||||||
check_call([
|
check_call([
|
||||||
'lessc', '--clean-css',
|
'lessc', '--clean-css',
|
||||||
|
Reference in New Issue
Block a user