-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #364 from bastibe/v0.12.0
Thank you, Barabazs, Andrew Murray, Jon Peirce, for contributions to this release. - Updated libsndfile to v1.2.0 - Improves precompiled library location, especially with py2app or cx-freeze. - Now provide binary wheels for Linux x86_64 - Now prefers packaged libsndfile over system-installed libsndfile
- Loading branch information
Showing
5 changed files
with
100 additions
and
39 deletions.
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
Submodule _soundfile_data
updated
10 files
+46 −12 | .github/workflows/build-libs.yml | |
+3 −0 | __init__.py | |
+21 −0 | darwin.cmake | |
+ − | libsndfile_32bit.dll | |
+ − | libsndfile_64bit.dll | |
+ − | libsndfile_arm64.dylib | |
+ − | libsndfile_x86_64.dylib | |
+ − | libsndfile_x86_64.so | |
+108 −0 | linux_build.sh | |
+47 −26 | mac_build.sh |
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,18 +1,27 @@ | ||
#!/usr/bin/env python | ||
import os | ||
from platform import architecture | ||
from platform import architecture, machine | ||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
import sys | ||
|
||
# environment variables for cross-platform package creation | ||
platform = os.environ.get('PYSOUNDFILE_PLATFORM', sys.platform) | ||
architecture0 = os.environ.get('PYSOUNDFILE_ARCHITECTURE', architecture()[0]) | ||
architecture0 = os.environ.get('PYSOUNDFILE_ARCHITECTURE') | ||
if architecture0 is None: | ||
# follow the same decision tree as in soundfile.py after | ||
# _find_library('sndfile') fails: | ||
if sys.platform == 'win32': | ||
architecture0 = architecture()[0] # 64bit or 32bit | ||
else: | ||
architecture0 = machine() # x86_64 or arm64 | ||
|
||
if platform == 'darwin': | ||
libname = 'libsndfile_' + architecture0 + '.dylib' | ||
elif platform == 'win32': | ||
libname = 'libsndfile_' + architecture0 + '.dll' | ||
elif platform == 'linux': | ||
libname = 'libsndfile_' + architecture0 + '.so' | ||
else: | ||
libname = None | ||
|
||
|
@@ -60,24 +69,37 @@ def get_tag(self): | |
pythons = 'py2.py3' | ||
if platform == 'darwin': | ||
if architecture0 == 'x86_64': | ||
oses = 'macosx_10_9_x86_64.macosx_11_0_x86_64' | ||
oses = 'macosx_10_9_x86_64' | ||
else: | ||
oses = 'macosx_10_9_arm64.macosx_11_0_arm64' | ||
oses = 'macosx_11_0_arm64' | ||
elif platform == 'win32': | ||
if architecture0 == '32bit': | ||
oses = 'win32' | ||
else: | ||
oses = 'win_amd64' | ||
elif platform == 'linux': | ||
# the oldest mainline github runner available is ubuntu 20.04, | ||
# which runs glibc 2.31: | ||
oses = 'manylinux_2_31_x86_64' | ||
else: | ||
pythons = 'py2.py3' | ||
oses = 'any' | ||
return pythons, 'none', oses | ||
|
||
cmdclass['bdist_wheel'] = bdist_wheel_half_pure | ||
|
||
with open('soundfile.py') as f: | ||
for line in f: | ||
if line.startswith('__version__'): | ||
_, soundfile_version = line.split('=') | ||
soundfile_version = soundfile_version.strip(' "\'\n') | ||
break | ||
else: | ||
raise RuntimeError("Could not find __version__ in soundfile.py") | ||
|
||
setup( | ||
name='soundfile', | ||
version='0.11.0', | ||
version=soundfile_version, | ||
description='An audio library based on libsndfile, CFFI and NumPy', | ||
author='Bastian Bechtold', | ||
author_email='[email protected]', | ||
|
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