Skip to content

Commit 1ccdfc1

Browse files
committed
Fix NumPy's printf format specifiers in C++.
Not sure why it works locally but not on Travis.
1 parent 2acf7bd commit 1ccdfc1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setupext.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ def add_flags(self, ext):
898898
ext.define_macros.append(('NPY_NO_DEPRECATED_API',
899899
'NPY_1_7_API_VERSION'))
900900

901+
# Allow NumPy's printf format specifiers in C++.
902+
ext.define_macros.append(('__STDC_FORMAT_MACROS', 1))
903+
901904
def get_setup_requires(self):
902905
return ['numpy>=1.7.1']
903906

0 commit comments

Comments
 (0)