diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-08-17 18:49:41 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-08-17 18:49:41 (GMT) |
commit | 9c3de4a88357cef2753d30c816a238bd74f39273 (patch) | |
tree | c799cb6ebcd0ec62801a275291e4f8b0ca9846d0 /setup.py | |
parent | c77239613ba08878f07fac5e23ea60fbcf386a06 (diff) | |
download | cpython-9c3de4a88357cef2753d30c816a238bd74f39273.zip cpython-9c3de4a88357cef2753d30c816a238bd74f39273.tar.gz cpython-9c3de4a88357cef2753d30c816a238bd74f39273.tar.bz2 |
Issue #12326: don't test the major version of sys.platform
Use startswith, instead of ==, when testing sys.platform to support
new platforms like Linux 3 or OpenBSD 5.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1381,9 +1381,8 @@ class PyBuildExt(build_ext): # End multiprocessing # Platform-specific libraries - if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', - 'freebsd7', 'freebsd8') - or platform.startswith("gnukfreebsd")): + if any(platform.startswith(prefix) + for prefix in ("linux", "freebsd", "gnukfreebsd")): exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) else: missing.append('ossaudiodev') |