Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit d6d4f15

Browse files
committed
Fix define_macros for Windows compatibility
1 parent 1fc24d0 commit d6d4f15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333

3434
if sys.platform == 'win32':
3535
warnings = ['-Wall']
36+
macros = {'LIBSASS_PYTHON_VERSION': '\\"' + version + '\\"'}
3637
else:
3738
warnings = ['-Wall', '-Wno-parentheses', '-Wno-tautological-compare']
39+
macros = {'LIBSASS_PYTHON_VERSION': '"' + version + '"'}
3840

3941
sass_extension = Extension(
4042
'sass',
4143
['sass.c'] + libsass_sources,
42-
define_macros=[('LIBSASS_PYTHON_VERSION', '"' + version + '"')],
44+
define_macros=macros.items(),
4345
depends=libsass_headers,
4446
extra_compile_args=['-c', '-O2', '-fPIC'] + warnings,
4547
extra_link_args=['-fPIC'],

0 commit comments

Comments
 (0)