forked from platypush/platypush
No need to run pip install pyScss in setup.py if it's not available
This commit is contained in:
parent
526136be36
commit
fbe4f9494c
2 changed files with 8 additions and 15 deletions
14
setup.py
14
setup.py
|
@ -3,8 +3,6 @@
|
|||
import errno
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import distutils.cmd
|
||||
from distutils.command.build import build
|
||||
from setuptools import setup, find_packages
|
||||
|
@ -23,15 +21,9 @@ class WebBuildCommand(distutils.cmd.Command):
|
|||
try:
|
||||
from scss import Compiler
|
||||
except ImportError:
|
||||
print('pyScss not found, trying to install it')
|
||||
cmd = [sys.executable, '-m', 'pip', 'install', 'pyScss']
|
||||
|
||||
try:
|
||||
subprocess.call(cmd)
|
||||
except Exception as e:
|
||||
print(('pyScss install command failed: {}: {}. You will have to generate ' +
|
||||
'the CSS files manually through python setup.py build install').format(' '.join(cmd), str(e)))
|
||||
return
|
||||
print('pyScss module not found: {}. You will have to generate ' +
|
||||
'the CSS files manually through python setup.py build install')
|
||||
return
|
||||
|
||||
print('Building CSS files')
|
||||
base_path = path(os.path.join('platypush','backend','http','static','css'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue