mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
Update setup.py to be adaptive to platform
This commit is contained in:
19
setup.py
19
setup.py
@ -1,8 +1,16 @@
|
||||
import os
|
||||
|
||||
import platform
|
||||
import pkg_resources
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
def get_pyannote_audio_version():
|
||||
machine = platform.machine()
|
||||
system = platform.system()
|
||||
version = "3.0.0" if machine == "aarch64" or system == "Darwin" else "3.0.1"
|
||||
return version
|
||||
|
||||
|
||||
setup(
|
||||
name="whisperx",
|
||||
py_modules=["whisperx"],
|
||||
@ -19,10 +27,11 @@ setup(
|
||||
for r in pkg_resources.parse_requirements(
|
||||
open(os.path.join(os.path.dirname(__file__), "requirements.txt"))
|
||||
)
|
||||
] + ["pyannote.audio==3.0.1"],
|
||||
entry_points = {
|
||||
'console_scripts': ['whisperx=whisperx.transcribe:cli'],
|
||||
]
|
||||
+ [f"pyannote.audio=={get_pyannote_audio_version()}"],
|
||||
entry_points={
|
||||
"console_scripts": ["whisperx=whisperx.transcribe:cli"],
|
||||
},
|
||||
include_package_data=True,
|
||||
extras_require={'dev': ['pytest']},
|
||||
extras_require={"dev": ["pytest"]},
|
||||
)
|
||||
|
Reference in New Issue
Block a user