-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
43 lines (35 loc) · 1.34 KB
/
setup.py
File metadata and controls
43 lines (35 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
import platform
import sys
from setuptools import find_packages, setup
def read_version(fname="whisper/version.py"):
namespace = {}
with open(fname, encoding="utf-8") as f:
exec(compile(f.read(), fname, "exec"), namespace)
return namespace["__version__"]
def read_requirements(fname="requirements.txt"):
with open(os.path.join(os.path.dirname(__file__), fname), encoding="utf-8") as f:
return [line.strip() for line in f if line.strip() and not line.startswith("#")]
requirements = []
if sys.platform.startswith("linux") and platform.machine() == "x86_64":
requirements.append("triton")
setup(
name="openai-whisper",
py_modules=["whisper"],
version=read_version(),
description="Robust Speech Recognition via Large-Scale Weak Supervision",
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
readme="README.md",
python_requires=">=3.10",
author="OpenAI",
url="https://github.com/espnet/whisper",
license="MIT",
packages=find_packages(exclude=["tests*"]),
install_requires=requirements + read_requirements(),
entry_points={
"console_scripts": ["whisper=whisper.transcribe:cli"],
},
include_package_data=True,
extras_require={"dev": ["pytest", "scipy", "black[jupyter]", "flake8", "isort"]},
)