Fix build of ossaudiodev in Linux/FreeBSD for Python 2.6 (#2049)

This is essentially the same fix as in pull request #2047, but it
is applied from Python 2.6.6 to 2.6.9, and for `ossaudiodev` as well
as the (deprecated) `linuxaudiodev`.
This commit is contained in:
Víctor Molina García 2021-09-05 20:54:57 +02:00 committed by GitHub
parent 22e1aa6e9d
commit f7450587dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 4 deletions

View file

@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
# Add paths specified in the environment variables LDFLAGS and # Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files. # CPPFLAGS for header and library files.
@@ -1443,14 +1443,13 @@
# Platform-specific libraries
- if platform == 'linux2':
+ if platform.startswith('linux'):
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
else:
missing.append('linuxaudiodev')
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8'):
+ if platform.startswith('linux') or platform.startswith('freebsd'):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')

View file

@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
# Add paths specified in the environment variables LDFLAGS and # Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files. # CPPFLAGS for header and library files.
@@ -1443,14 +1443,13 @@
# Platform-specific libraries
- if platform == 'linux2':
+ if platform.startswith('linux'):
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
else:
missing.append('linuxaudiodev')
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8'):
+ if platform.startswith('linux') or platform.startswith('freebsd'):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')

View file

@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
# Add paths specified in the environment variables LDFLAGS and # Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files. # CPPFLAGS for header and library files.
@@ -1443,14 +1443,13 @@
# Platform-specific libraries
- if platform == 'linux2':
+ if platform.startswith('linux'):
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
else:
missing.append('linuxaudiodev')
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8'):
+ if platform.startswith('linux') or platform.startswith('freebsd'):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')

View file

@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
# Add paths specified in the environment variables LDFLAGS and # Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files. # CPPFLAGS for header and library files.
@@ -1443,14 +1443,13 @@
# Platform-specific libraries
- if platform == 'linux2':
+ if platform.startswith('linux'):
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
else:
missing.append('linuxaudiodev')
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8'):
+ if platform.startswith('linux') or platform.startswith('freebsd'):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')