mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-15 13:02:20 +00:00
Fix building pip packages on macOS.
This commit is contained in:
parent
ee18278a03
commit
8362806add
@ -2,6 +2,7 @@
|
||||
|
||||
import glob
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
@ -15,6 +16,10 @@ def is_for_pypi():
|
||||
return ans is not None
|
||||
|
||||
|
||||
def is_macos():
|
||||
return platform.system() == "Darwin"
|
||||
|
||||
|
||||
try:
|
||||
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
|
||||
|
||||
@ -23,7 +28,7 @@ try:
|
||||
_bdist_wheel.finalize_options(self)
|
||||
# In this case, the generated wheel has a name in the form
|
||||
# k2-xxx-pyxx-none-any.whl
|
||||
if is_for_pypi():
|
||||
if is_for_pypi() and not is_macos():
|
||||
self.root_is_pure = True
|
||||
else:
|
||||
# The generated wheel has a name ending with
|
||||
|
Loading…
x
Reference in New Issue
Block a user