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

Commit e5c5ea8

Browse files
committed
Fixed build options for Windows compatibility
1 parent b99c301 commit e5c5ea8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Version 0.2.1
66

77
To be released.
88

9+
- Fixed :file:`setup.py` build options for Windows compatibility.
10+
911

1012
Version 0.2.0
1113
-------------

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import os.path
66
import shutil
7+
import sys
78
import tempfile
89

910
try:
@@ -30,14 +31,17 @@
3031
'sass_interface.h'
3132
]
3233

34+
if sys.platform == 'win32':
35+
warnings = ['-Wall']
36+
else:
37+
warnings = ['-Wall', '-Wno-parentheses', '-Wno-tautological-compare']
38+
3339
sass_extension = Extension(
3440
'sass',
3541
['sass.c'] + libsass_sources,
3642
define_macros=[('LIBSASS_PYTHON_VERSION', '"' + version + '"')],
3743
depends=libsass_headers,
38-
extra_compile_args=['-c', '-O2', '-fPIC',
39-
'-Wall', '-Wno-parentheses',
40-
'-Wno-tautological-compare'],
44+
extra_compile_args=['-c', '-O2', '-fPIC'] + warnings,
4145
extra_link_args=['-fPIC'],
4246
)
4347

0 commit comments

Comments
 (0)