Skip to content

Commit

Permalink
Merge pull request #541 from justinwlin/main
Browse files Browse the repository at this point in the history
Update setup.py to download pyannote depending on platform
  • Loading branch information
m-bain authored Oct 25, 2023
2 parents 49e0130 + b522133 commit e9a6385
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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"],
Expand All @@ -19,10 +27,11 @@
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"]},
)

0 comments on commit e9a6385

Please sign in to comment.