diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-08-17 20:49:41 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-08-17 20:49:41 +0200 |
commit | dcfb4241c1c4437eccb2c5e67988cf2a5255d13b (patch) | |
tree | ca1a87a618b9987cd379546bcd96cb402fd8489b /setup.py | |
parent | f24d6fceda724e8dab83d8160bd331ff5851f930 (diff) | |
download | cpython-dcfb4241c1c4437eccb2c5e67988cf2a5255d13b.tar.gz |
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') |