2023-03-07 19:31:40 +00:00
|
|
|
import platform
|
2023-03-06 22:00:49 +00:00
|
|
|
import sys
|
2023-12-11 15:39:08 +00:00
|
|
|
from pathlib import Path
|
2022-09-21 15:43:20 +00:00
|
|
|
|
|
|
|
|
import pkg_resources
|
2023-03-06 23:50:37 +00:00
|
|
|
from setuptools import find_packages, setup
|
2022-09-21 15:43:20 +00:00
|
|
|
|
2023-01-17 23:50:26 +00:00
|
|
|
|
|
|
|
|
def read_version(fname="whisper/version.py"):
|
|
|
|
|
exec(compile(open(fname, encoding="utf-8").read(), fname, "exec"))
|
|
|
|
|
return locals()["__version__"]
|
|
|
|
|
|
|
|
|
|
|
2023-03-06 22:00:49 +00:00
|
|
|
requirements = []
|
2023-03-07 19:31:40 +00:00
|
|
|
if sys.platform.startswith("linux") and platform.machine() == "x86_64":
|
2024-09-10 16:53:08 +00:00
|
|
|
requirements.append("triton>=2.0.0")
|
2023-03-06 22:00:49 +00:00
|
|
|
|
2022-09-21 15:43:20 +00:00
|
|
|
setup(
|
2023-01-17 23:50:26 +00:00
|
|
|
name="openai-whisper",
|
2022-09-21 15:43:20 +00:00
|
|
|
py_modules=["whisper"],
|
2023-01-17 23:50:26 +00:00
|
|
|
version=read_version(),
|
2022-10-17 20:51:16 +00:00
|
|
|
description="Robust Speech Recognition via Large-Scale Weak Supervision",
|
2023-01-17 23:50:26 +00:00
|
|
|
long_description=open("README.md", encoding="utf-8").read(),
|
|
|
|
|
long_description_content_type="text/markdown",
|
2022-10-17 20:51:16 +00:00
|
|
|
readme="README.md",
|
2023-03-07 12:47:46 +00:00
|
|
|
python_requires=">=3.8",
|
2022-09-21 15:43:20 +00:00
|
|
|
author="OpenAI",
|
2022-10-17 20:51:16 +00:00
|
|
|
url="https://github.com/openai/whisper",
|
|
|
|
|
license="MIT",
|
2022-09-21 15:43:20 +00:00
|
|
|
packages=find_packages(exclude=["tests*"]),
|
2023-12-11 15:39:08 +00:00
|
|
|
install_requires=[
|
2022-09-21 15:43:20 +00:00
|
|
|
str(r)
|
|
|
|
|
for r in pkg_resources.parse_requirements(
|
2023-12-11 15:39:08 +00:00
|
|
|
Path(__file__).with_name("requirements.txt").open()
|
2022-09-21 15:43:20 +00:00
|
|
|
)
|
|
|
|
|
],
|
2023-01-17 23:50:26 +00:00
|
|
|
entry_points={
|
|
|
|
|
"console_scripts": ["whisper=whisper.transcribe:cli"],
|
2022-09-21 15:43:20 +00:00
|
|
|
},
|
|
|
|
|
include_package_data=True,
|
2023-03-06 23:50:37 +00:00
|
|
|
extras_require={"dev": ["pytest", "scipy", "black", "flake8", "isort"]},
|
2022-09-21 15:43:20 +00:00
|
|
|
)
|