24
24
25
25
from six import string_types , text_type , PY2 , PY3
26
26
27
- from _sass import OUTPUT_STYLES , compile_filename , compile_string
27
+ import _sass
28
28
29
- __all__ = ('MODES' , 'OUTPUT_STYLES' , 'SOURCE_COMMENTS' , 'CompileError' ,
30
- 'SassColor' , 'SassError' , 'SassFunction' , 'SassList' , 'SassMap' ,
31
- 'SassNumber' , 'SassWarning' , 'and_join' , 'compile' )
29
+ __all__ = (
30
+ 'MODES' , 'OUTPUT_STYLES' , 'SOURCE_COMMENTS' , 'CompileError' , 'SassColor' ,
31
+ 'SassError' , 'SassFunction' , 'SassList' , 'SassMap' , 'SassNumber' ,
32
+ 'SassWarning' , 'and_join' , 'compile' , 'libsass_version' ,
33
+ )
32
34
__version__ = '0.10.1'
35
+ libsass_version = _sass .libsass_version
33
36
34
37
35
38
#: (:class:`collections.Mapping`) The dictionary of output styles.
36
39
#: Keys are output name strings, and values are flag integers.
37
- OUTPUT_STYLES = OUTPUT_STYLES
40
+ OUTPUT_STYLES = _sass . OUTPUT_STYLES
38
41
39
42
#: (:class:`collections.Mapping`) The dictionary of source comments styles.
40
43
#: Keys are mode names, and values are corresponding flag integers.
@@ -226,7 +229,7 @@ def compile_dirname(
226
229
output_filename = os .path .join (output_path , relpath_to_file )
227
230
output_filename = re .sub ('.s[ac]ss$' , '.css' , output_filename )
228
231
input_filename = input_filename .encode (fs_encoding )
229
- s , v , _ = compile_filename (
232
+ s , v , _ = _sass . compile_filename (
230
233
input_filename , output_style , source_comments , include_paths ,
231
234
precision , None , custom_functions , importers
232
235
)
@@ -584,7 +587,7 @@ def my_importer(path):
584
587
raise TypeError ('indented must be bool, not ' +
585
588
repr (source_comments ))
586
589
_check_no_remaining_kwargs (compile , kwargs )
587
- s , v = compile_string (
590
+ s , v = _sass . compile_string (
588
591
string , output_style , source_comments , include_paths , precision ,
589
592
custom_functions , indented , importers ,
590
593
)
@@ -599,7 +602,7 @@ def my_importer(path):
599
602
elif isinstance (filename , text_type ):
600
603
filename = filename .encode (fs_encoding )
601
604
_check_no_remaining_kwargs (compile , kwargs )
602
- s , v , source_map = compile_filename (
605
+ s , v , source_map = _sass . compile_filename (
603
606
filename , output_style , source_comments , include_paths , precision ,
604
607
source_map_filename , custom_functions , importers ,
605
608
)
0 commit comments