forked from imiric/flask-sass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (54 loc) · 2.01 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""
flask-sass
==========
A small Flask extension that makes it easy to use Sass (SCSS) with your Flask application.
Package unabashedly adapted from https://github.com/weapp/flask-coffee2js.
Usage
-----
You can activate it by calling the ``sass`` function with your Flask app as a parameter:
from flaskext.sass import sass
sass(app, input_dir='assets/scss', output_dir='static/css')
This will intercept the request for ``output_dir/*.css`` and compile the file if it is
necesary using the files from ``input_dir/*.scss``.
When you deploy your app you might not want to accept the overhead of checking
the modification time of your ``.scss`` and ``.css`` files on each request. A
simple way to avoid this is wrapping the sass call in an if statement:
if app.debug:
from flaskext.sass import sass
sass(app)
If you do this you'll be responsible for rendering the ``.scss`` files into
``.css`` when you deploy in non-debug mode to your production server.
- documentation_
- development_
.. _documentation: https://github.com/imiric/flask-sass
.. _development: https://github.com/imiric/flask-sass
"""
from setuptools import setup
setup(
name='flask-sass',
version='0.1',
url='https://github.com/imiric/flask-sass',
license='MIT',
author='Ivan Miric',
#author_email='',
description='A small Flask extension that adds Sass (SCSS) support to Flask.',
long_description=__doc__,
packages=['flaskext'],
namespace_packages=['flaskext'],
zip_safe=False,
platforms='any',
install_requires=[
'Flask',
'pyScss'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)