mirror of
https://github.com/frappe/bench.git
synced 2025-02-08 05:38:25 +00:00
print pillow requirements and added them to setup_frappe.sh
This commit is contained in:
parent
b9385257cc
commit
b3c95685ec
@ -245,9 +245,6 @@ def _update(pull=False, patch=False, build=False, bench=False, auto=False, resta
|
|||||||
|
|
||||||
def update(pull=False, patch=False, build=False, bench=False, auto=False, restart_supervisor=False, requirements=False, no_backup=False, upgrade=False, bench_path='.', force=False):
|
def update(pull=False, patch=False, build=False, bench=False, auto=False, restart_supervisor=False, requirements=False, no_backup=False, upgrade=False, bench_path='.', force=False):
|
||||||
conf = get_config(bench=bench_path)
|
conf = get_config(bench=bench_path)
|
||||||
if not validate_os_requirements():
|
|
||||||
return
|
|
||||||
|
|
||||||
version_upgrade = is_version_upgrade(bench=bench_path)
|
version_upgrade = is_version_upgrade(bench=bench_path)
|
||||||
|
|
||||||
if version_upgrade[0] and not upgrade:
|
if version_upgrade[0] and not upgrade:
|
||||||
|
@ -351,7 +351,13 @@ def update_requirements(bench='.'):
|
|||||||
for app in os.listdir(apps_dir):
|
for app in os.listdir(apps_dir):
|
||||||
req_file = os.path.join(apps_dir, app, 'requirements.txt')
|
req_file = os.path.join(apps_dir, app, 'requirements.txt')
|
||||||
if os.path.exists(req_file):
|
if os.path.exists(req_file):
|
||||||
|
try:
|
||||||
exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
|
exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
|
||||||
|
except CommandFailedError, e:
|
||||||
|
if "Pillow" in e:
|
||||||
|
print_pillow_dependencies()
|
||||||
|
|
||||||
|
raise
|
||||||
|
|
||||||
def backup_site(site, bench='.'):
|
def backup_site(site, bench='.'):
|
||||||
if FRAPPE_VERSION == 4:
|
if FRAPPE_VERSION == 4:
|
||||||
@ -614,27 +620,21 @@ def log_line(data, stream):
|
|||||||
return sys.stderr.write(data)
|
return sys.stderr.write(data)
|
||||||
return sys.stdout.write(data)
|
return sys.stdout.write(data)
|
||||||
|
|
||||||
def validate_os_requirements():
|
def print_pillow_dependencies():
|
||||||
valid = validate_libjpeg()
|
|
||||||
return valid
|
|
||||||
|
|
||||||
def validate_libjpeg():
|
|
||||||
out = get_output("whereis", "libjpeg")
|
|
||||||
|
|
||||||
if not out:
|
|
||||||
distro = platform.linux_distribution()
|
distro = platform.linux_distribution()
|
||||||
distro_name = distro[0].lower()
|
distro_name = distro[0].lower()
|
||||||
if "centos" in distro_name:
|
if "centos" in distro_name or "fedora" in distro_name:
|
||||||
print "Please install libjpeg using the command:"
|
print "Please install these dependencies using the command:"
|
||||||
print "sudo yum install libjpeg-devel"
|
print "sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel"
|
||||||
return False
|
|
||||||
|
|
||||||
elif "ubuntu" in distro_name or "elementary os" in distro_name or "debian" in distro_name:
|
elif "ubuntu" in distro_name or "elementary os" in distro_name or "debian" in distro_name:
|
||||||
print "Please install libjpeg using the command:"
|
print "Please install these dependencies using the command:"
|
||||||
print "sudo apt-get install libjpeg-dev"
|
|
||||||
return False
|
if "ubuntu" in distro_name and distro[1]=="12.04":
|
||||||
|
print "sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk"
|
||||||
|
else:
|
||||||
|
print "sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk"
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
def get_output(*cmd):
|
def get_output(*cmd):
|
||||||
s = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
s = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||||
|
@ -179,10 +179,18 @@ install_packages() {
|
|||||||
run_cmd sudo yum groupinstall -y "Development tools"
|
run_cmd sudo yum groupinstall -y "Development tools"
|
||||||
if [ $OS_VER == "6" ]; then
|
if [ $OS_VER == "6" ]; then
|
||||||
run_cmd add_ius_repo
|
run_cmd add_ius_repo
|
||||||
run_cmd sudo yum install -y git MariaDB-server MariaDB-client MariaDB-compat python-setuptools nginx zlib-devel bzip2-devel openssl-devel postfix python27-devel python27 libxml2 libxml2-devel libxslt libxslt-devel redis MariaDB-devel libXrender libXext python27-setuptools cronie sudo which xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi nodejs npm libjpeg-devel
|
run_cmd sudo yum install -y git MariaDB-server MariaDB-client MariaDB-compat python-setuptools nginx \
|
||||||
|
zlib-devel bzip2-devel openssl-devel postfix python27-devel python27 \
|
||||||
|
libxml2 libxml2-devel libxslt libxslt-devel redis MariaDB-devel libXrender libXext \
|
||||||
|
python27-setuptools cronie sudo which xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi nodejs npm \
|
||||||
|
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
|
||||||
elif [ $OS_VER == "7" ]; then
|
elif [ $OS_VER == "7" ]; then
|
||||||
run_cmd add_epel_centos7
|
run_cmd add_epel_centos7
|
||||||
run_cmd sudo yum install -y git mariadb-server mariadb-devel python-setuptools nginx zlib-devel bzip2-devel openssl-devel postfix python-devel libxml2 libxml2-devel libxslt libxslt-devel redis libXrender libXext supervisor cronie sudo which xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 nodejs npm libjpeg-devel
|
run_cmd sudo yum install -y git mariadb-server mariadb-devel python-setuptools nginx \
|
||||||
|
zlib-devel bzip2-devel openssl-devel postfix python-devel \
|
||||||
|
libxml2 libxml2-devel libxslt libxslt-devel redis libXrender libXext \
|
||||||
|
supervisor cronie sudo which xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 nodejs npm \
|
||||||
|
libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing wkhtmltopdf"
|
echo "Installing wkhtmltopdf"
|
||||||
@ -197,7 +205,11 @@ install_packages() {
|
|||||||
run_cmd bash -c "curl -sL https://deb.nodesource.com/setup_0.12 | bash -"
|
run_cmd bash -c "curl -sL https://deb.nodesource.com/setup_0.12 | bash -"
|
||||||
fi
|
fi
|
||||||
run_cmd sudo apt-get update
|
run_cmd sudo apt-get update
|
||||||
run_cmd sudo apt-get install -y python-dev python-setuptools build-essential python-mysqldb git ntp vim screen htop mariadb-server mariadb-common libmariadbclient-dev libxslt1.1 libxslt1-dev redis-server libssl-dev libcrypto++-dev postfix nginx supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base nodejs npm libjpeg-dev
|
run_cmd sudo apt-get install -y python-dev python-setuptools build-essential python-mysqldb git \
|
||||||
|
ntp vim screen htop mariadb-server mariadb-common libmariadbclient-dev \
|
||||||
|
libxslt1.1 libxslt1-dev redis-server libssl-dev libcrypto++-dev postfix nginx \
|
||||||
|
supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base nodejs npm \
|
||||||
|
libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
|
||||||
|
|
||||||
echo "Installing wkhtmltopdf"
|
echo "Installing wkhtmltopdf"
|
||||||
install_wkhtmltopdf_deb
|
install_wkhtmltopdf_deb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user