2424
2525from six import string_types , text_type , PY2 , PY3
2626
27- from _sass import OUTPUT_STYLES , compile_filename , compile_string
27+ import _sass
2828
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+ )
3234__version__ = '0.10.1'
35+ libsass_version = _sass .libsass_version
3336
3437
3538#: (:class:`collections.Mapping`) The dictionary of output styles.
3639#: Keys are output name strings, and values are flag integers.
37- OUTPUT_STYLES = OUTPUT_STYLES
40+ OUTPUT_STYLES = _sass . OUTPUT_STYLES
3841
3942#: (:class:`collections.Mapping`) The dictionary of source comments styles.
4043#: Keys are mode names, and values are corresponding flag integers.
@@ -226,7 +229,7 @@ def compile_dirname(
226229 output_filename = os .path .join (output_path , relpath_to_file )
227230 output_filename = re .sub ('.s[ac]ss$' , '.css' , output_filename )
228231 input_filename = input_filename .encode (fs_encoding )
229- s , v , _ = compile_filename (
232+ s , v , _ = _sass . compile_filename (
230233 input_filename , output_style , source_comments , include_paths ,
231234 precision , None , custom_functions , importers
232235 )
@@ -584,7 +587,7 @@ def my_importer(path):
584587 raise TypeError ('indented must be bool, not ' +
585588 repr (source_comments ))
586589 _check_no_remaining_kwargs (compile , kwargs )
587- s , v = compile_string (
590+ s , v = _sass . compile_string (
588591 string , output_style , source_comments , include_paths , precision ,
589592 custom_functions , indented , importers ,
590593 )
@@ -599,7 +602,7 @@ def my_importer(path):
599602 elif isinstance (filename , text_type ):
600603 filename = filename .encode (fs_encoding )
601604 _check_no_remaining_kwargs (compile , kwargs )
602- s , v , source_map = compile_filename (
605+ s , v , source_map = _sass . compile_filename (
603606 filename , output_style , source_comments , include_paths , precision ,
604607 source_map_filename , custom_functions , importers ,
605608 )
0 commit comments