| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | #!/usr/bin/env python3 | |
| 2 | 2 | import os.path | |
| 3 | + import sys | ||
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | 6 | TEST_CPP = False | |
@@ -22,16 +23,19 @@ | |||
| 22 | 23 | # mixture of designated and non-designated initializers | |
| 23 | 24 | '-std=c99', | |
| 24 | 25 | ] | |
| 25 | - CPPFLAGS = COMMON_FLAGS + [ | ||
| 26 | - # no C++ option yet | ||
| 27 | - ] | ||
| 26 | + CPPFLAGS = list(COMMON_FLAGS) | ||
| 27 | + if sys.version_info >= (3, 12): | ||
| 28 | + CPPFLAGS.extend(( | ||
| 29 | + '-Wold-style-cast', | ||
| 30 | + '-Wzero-as-null-pointer-constant', | ||
| 31 | + )) | ||
| 32 | + | ||
| 28 | 33 | ||
| 29 | 34 | def main(): | |
| 30 | 35 | try: | |
| 31 | 36 | from setuptools import setup, Extension | |
| 32 | 37 | except ImportError: | |
| 33 | 38 | from distutils.core import setup, Extension | |
| 34 | - import sys | ||
| 35 | 39 | ||
| 36 | 40 | if len(sys.argv) >= 3 and sys.argv[2] == '--build-cppext': | |
| 37 | 41 | global TEST_CPP | |
| Back | FazBrowse Home | New Git URL |
0 commit comments