summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-08-17 20:49:41 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-08-17 20:49:41 +0200
commitdcfb4241c1c4437eccb2c5e67988cf2a5255d13b (patch)
treeca1a87a618b9987cd379546bcd96cb402fd8489b /setup.py
parentf24d6fceda724e8dab83d8160bd331ff5851f930 (diff)
downloadcpython-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.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 968670c023..e12768590b 100644
--- a/setup.py
+++ b/setup.py
@@ -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')