setup.py
changeset 44605 960770add699
parent 44588 2a98b0cd4995
child 44630 4c6189d45d67
--- a/setup.py	Wed Mar 25 08:28:20 2020 -0700
+++ b/setup.py	Wed Mar 25 11:56:47 2020 -0400
@@ -1270,8 +1270,9 @@
 
 common_cflags = []
 
-# MSVC 2008 still needs declarations at the top of the scope.
-if os.name != 'nt':
+# MSVC 2008 still needs declarations at the top of the scope, but Python 3.9
+# makes declarations not at the top of a scope in the headers.
+if os.name != 'nt' and sys.version_info[1] < 9:
     common_cflags = ['-Werror=declaration-after-statement']
 
 osutil_cflags = []