switch to scss

This commit is contained in:
Frédéric Péters 2016-05-27 22:31:03 +02:00
parent 54964dedd9
commit 422799a06e
4 changed files with 27 additions and 2 deletions

View File

@ -4,5 +4,5 @@ include MANIFEST.in
include AUTHORS
include COPYING
include VERSION
recursive-include gadjo/static *.css *.png *.gif *.eot *.woff *.ttf *.svg *.jpg *.js README.md LICENSE release.sh
recursive-include gadjo/static *.scss *.css *.png *.gif *.eot *.woff *.ttf *.svg *.jpg *.js README.md LICENSE release.sh
recursive-include icons *.svg

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: gadjo
Maintainer: Frederic Peters <fpeters@entrouvert.com>
Section: python
Priority: optional
Build-Depends: python-setuptools (>= 0.6b3), dh-python, dpkg-dev, python-all (>= 2.6.6-3), python2.7-dev, python-all-dev, debhelper (>= 7), python-django, inkscape, python-imaging, libjpeg8-dev | libjpeg-dev, zlib1g-dev
Build-Depends: python-setuptools (>= 0.6b3), dh-python, dpkg-dev, python-all (>= 2.6.6-3), python2.7-dev, python-all-dev, debhelper (>= 7), python-django, inkscape, python-imaging, libjpeg8-dev | libjpeg-dev, zlib1g-dev, ruby-sass
Standards-Version: 3.9.1
Package: python-gadjo

View File

@ -76,6 +76,29 @@ class compile_translations(Command):
os.chdir(curdir)
class compile_scss(Command):
description = 'compile scss files into css files'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
for package in self.distribution.packages:
for package_path in __import__(package).__path__:
for path, dirnames, filenames in os.walk(package_path):
for filename in filenames:
if not filename.endswith('.scss'):
continue
if filename.startswith('_'):
continue
subprocess.call(['sass', '%s/%s:%s/%s' % (
path, filename, path, filename.replace('.scss', '.css'))])
class build_icons(Command):
description = 'build icons'
user_options = []
@ -152,6 +175,7 @@ class build_icons(Command):
class build(_build):
sub_commands = [('compile_translations', None),
('compile_scss', None),
('build_icons', None)] + _build.sub_commands
@ -192,6 +216,7 @@ setup(
cmdclass={
'build': build,
'build_icons': build_icons,
'compile_scss': compile_scss,
'compile_translations': compile_translations,
'install_lib': install_lib,
'sdist': eo_sdist