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

Commit 4cef64d

Browse files
committed
Fix broken build on Mac
1 parent f41579a commit 4cef64d

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "libsass"]
2-
path = libsass
3-
url = https://github.com/sass/libsass.git
2+
path = libsass
3+
url = git://github.com/dahlia/libsass-python.git

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ distribution/deployment. That means you can add just ``libsass`` into
2424
your ``setup.py``'s ``install_requires`` list or ``requirements.txt`` file.
2525
Need no Ruby nor Node.js.
2626

27-
It currently supports CPython 2.6, 2.7, 3.3, 3.4, and PyPy 1.9+!
27+
It currently supports CPython 2.6, 2.7, 3.3, 3.4, and PyPy 2.3+!
2828

2929
.. _SASS: http://sass-lang.com/
3030
.. _Libsass: https://github.com/hcatlin/libsass

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ distribution/deployment. That means you can add just ``libsass`` into
88
your :file:`setup.py`'s ``install_requires`` list or :file:`requirements.txt`
99
file.
1010

11-
It currently supports CPython 2.6, 2.7, 3.3, 3.4, and PyPy 2.2!
11+
It currently supports CPython 2.6, 2.7, 3.3, 3.4, and PyPy 2.3!
1212

1313
.. _SASS: http://sass-lang.com/
1414
.. _Libsass: https://github.com/hcatlin/libsass

libsass

Submodule libsass updated from 5f3558d to 030e267

setup.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import ast
44
import distutils.cmd
55
import distutils.log
6+
import distutils.sysconfig
67
import glob
78
import os
89
import os.path
@@ -90,9 +91,20 @@ def spawn(self, cmd):
9091
flags = ['-I' + os.path.abspath('win32')]
9192
link_flags = []
9293
else:
93-
flags = ['-fPIC', '-std=c++11', '-Wall', '-Wno-parentheses']
94+
flags = ['-fPIC', '-std=c++0x', '-Wall', '-Wno-parentheses']
9495
platform.mac_ver()
9596
if platform.system() == 'Darwin':
97+
os.environ['CC'] = os.environ['CXX'] = 'c++'
98+
orig_customize_compiler = distutils.sysconfig.customize_compiler
99+
100+
def customize_compiler(compiler):
101+
orig_customize_compiler(compiler)
102+
compiler.compiler[0] = 'c++'
103+
compiler.compiler_so[0] = 'c++'
104+
compiler.compiler_cxx[0] = 'c++'
105+
compiler.linker_so[0] = 'c++'
106+
return compiler
107+
distutils.sysconfig.customize_compiler = customize_compiler
96108
flags.extend([
97109
'-stdlib=libc++',
98110
'-mmacosx-version-min=10.7',
@@ -111,7 +123,6 @@ def spawn(self, cmd):
111123
depends=libsass_headers,
112124
extra_compile_args=['-c', '-O2'] + flags,
113125
extra_link_args=link_flags,
114-
language='c++',
115126
)
116127

117128

0 commit comments

Comments
 (0)