No need to run pip install pyScss in setup.py if it's not available

This commit is contained in:
Fabio Manganiello 2019-12-02 00:24:28 +01:00
parent 526136be36
commit fbe4f9494c
2 changed files with 8 additions and 15 deletions

View file

@ -90,11 +90,12 @@ def generate_dockerfile(deps, ports, cfgfile, devdir, python_version):
for dep in deps:
content += '\t&& pip install {} \\\n'.format(dep)
content += '\t&& pip install ' + \
'git+https://github.com/BlackLight/platypush.git \\\n'
content += textwrap.dedent(
'''
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:
content += 'EXPOSE {}\n'.format(port)

View file

@ -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,14 +21,8 @@ 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)))
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')