Commit 3e8aadbb authored by Vitalis Salis's avatar Vitalis Salis Committed by Giorgos Korfiatis

admin: Remove compiled css files and add support for compiling them on setup

Conflicts:
	snf-admin-app/synnefo_admin/admin/static/css/main-light.css
	snf-admin-app/synnefo_admin/admin/static/css/main.css
	snf-admin-app/synnefo_admin/admin/static/css/screen.css
	snf-admin-app/synnefo_admin/admin/static/min-css/main-light.css
	snf-admin-app/synnefo_admin/admin/static/min-css/main.css
	snf-admin-app/synnefo_admin/admin/static/min-css/screen.css
parent 13355d1c
......@@ -51,3 +51,5 @@ snf-deploy/files/root/.ssh
snf-deploy/files/root/ddns
*.egg
*.tar.gz
snf-admin-app/synnefo_admin/admin/static/min-css
snf-admin-app/synnefo_admin/admin/static/css
......@@ -137,6 +137,46 @@ def find_package_data(
out.setdefault(package, []).append(prefix+name)
return out
trigger_build = ["sdist", "build", "develop", "install"]
cmd = ''.join(sys.argv)
def compile_sass():
import subprocess
from distutils.spawn import find_executable
css_dir = os.path.join(".", "synnefo_admin", "admin", "static")
if not find_executable("gem"):
raise Exception("gem not found, please install ruby and gem")
if not find_executable("compass"):
print "Install compass"
ret = subprocess.call(["gem", "install", "compass"])
if ret == 1:
raise Exception("gem install failed")
compass_cmd = ["compass", "compile", css_dir, "-e"]
ret = subprocess.call(compass_cmd + ["production"])
if ret == 1:
raise Exception("compass compile failed")
if "develop" in cmd:
ret = subprocess.call(compass_cmd + ["development"])
if ret == 1:
raise Exception("compass development compile failed")
if any(x in cmd for x in trigger_build):
if os.path.exists("./synnefo_admin/admin/static/min-css"):
print "The css files are already compiled in synnefo_admin/admin/static/min-css"
else:
if os.environ.get('SNFADMIN_AUTO_COMPILE', True) not in \
['False', 'false', '0']:
compile_sass()
setup(
name='snf-admin-app',
version=VERSION,
......
This diff is collapsed.
/* Welcome to Compass.
* In this file you should write your main styles. (or centralize your imports)
* Import this file using the following HTML or equivalent:
* <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
/* line 17, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline; }
/* line 22, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html {
line-height: 1; }
/* line 24, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
ol, ul {
list-style: none; }
/* line 26, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
table {
border-collapse: collapse;
border-spacing: 0; }
/* line 28, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle; }
/* line 30, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
quotes: none; }
/* line 103, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none; }
/* line 32, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
a img {
border: none; }
/* line 116, ../../../../../../../var/lib/gems/1.9.1/gems/compass-0.12.7/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block; }
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment