forked from eliben/pycparser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comments and clean up whitespace
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
#------------------------------------------------------------------------------ | ||
# pycparser: test_util.py | ||
# | ||
# Utility code for tests. | ||
# | ||
# Eli Bendersky [https://eli.thegreenplace.net/] | ||
# This file contributed by [email protected] | ||
# License: BSD | ||
#------------------------------------------------------------------------------ | ||
import platform | ||
|
||
|
||
def cpp_supported(): | ||
"""Is cpp (the C preprocessor) supported as a native command?""" | ||
return platform.system() == 'Linux' or platform.system() == 'Darwin' | ||
|
||
|
||
def cpp_path(): | ||
"""Path to cpp command.""" | ||
if platform.system() == 'Darwin': | ||
return 'gcc' | ||
return 'cpp' | ||
|
||
|
||
def cpp_args(args=[]): | ||
"""Turn args into a suitable format for passing to cpp.""" | ||
if isinstance(args, str): | ||
args = [args] | ||
if platform.system() == 'Darwin': | ||
|