Skip to content

Commit 83bd0ba

Browse files
committed
setup.py is not always for building [ci skip]
1 parent 38530ee commit 83bd0ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ def customize_compiler(compiler):
116116

117117
@atexit.register
118118
def restore_cencode():
119-
with open(cencode_path, 'w') as f:
120-
f.write(cencode_body)
119+
if os.path.isfile(cencode_path):
120+
with open(cencode_path, 'w') as f:
121+
f.write(cencode_body)
121122
link_flags = ['-fPIC', '-lstdc++']
122123

123124
sass_extension = Extension(

0 commit comments

Comments
 (0)