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
|
@ -90,11 +90,12 @@ def generate_dockerfile(deps, ports, cfgfile, devdir, python_version):
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
content += '\t&& pip install {} \\\n'.format(dep)
|
content += '\t&& pip install {} \\\n'.format(dep)
|
||||||
|
|
||||||
content += '\t&& pip install ' + \
|
content += textwrap.dedent(
|
||||||
'git+https://github.com/BlackLight/platypush.git \\\n'
|
'''
|
||||||
|
RUN pip install git+https://github.com/BlackLight/platypush.git
|
||||||
|
RUN apk del git && apk del build-base
|
||||||
|
|
||||||
content += '\t&& apk del git \\\n'
|
''')
|
||||||
content += '\t&& apk del build-base\n\n'
|
|
||||||
|
|
||||||
for port in ports:
|
for port in ports:
|
||||||
content += 'EXPOSE {}\n'.format(port)
|
content += 'EXPOSE {}\n'.format(port)
|
||||||
|
|
12
setup.py
12
setup.py
|
@ -3,8 +3,6 @@
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import distutils.cmd
|
import distutils.cmd
|
||||||
from distutils.command.build import build
|
from distutils.command.build import build
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
@ -23,14 +21,8 @@ class WebBuildCommand(distutils.cmd.Command):
|
||||||
try:
|
try:
|
||||||
from scss import Compiler
|
from scss import Compiler
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print('pyScss not found, trying to install it')
|
print('pyScss module not found: {}. You will have to generate ' +
|
||||||
cmd = [sys.executable, '-m', 'pip', 'install', 'pyScss']
|
'the CSS files manually through python setup.py build install')
|
||||||
|
|
||||||
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
|
return
|
||||||
|
|
||||||
print('Building CSS files')
|
print('Building CSS files')
|
||||||
|
|
Loading…
Reference in a new issue