setup.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import os
  2. from setuptools import find_packages, setup
  3. base_dir = os.path.dirname(os.path.abspath(__file__))
  4. def get_long_description():
  5. readme_path = os.path.join(base_dir, "README.md")
  6. with open(readme_path, encoding="utf-8") as readme_file:
  7. return readme_file.read()
  8. def get_project_version():
  9. version_path = os.path.join(base_dir, "faster_whisper", "version.py")
  10. version = {}
  11. with open(version_path, encoding="utf-8") as fp:
  12. exec(fp.read(), version)
  13. return version["__version__"]
  14. def get_requirements(path):
  15. with open(path, encoding="utf-8") as requirements:
  16. return [requirement.strip() for requirement in requirements]
  17. install_requires = get_requirements(os.path.join(base_dir, "requirements.txt"))
  18. conversion_requires = get_requirements(
  19. os.path.join(base_dir, "requirements.conversion.txt")
  20. )
  21. setup(
  22. name="faster-whisper",
  23. version=get_project_version(),
  24. license="MIT",
  25. description="Faster Whisper transcription with CTranslate2",
  26. long_description=get_long_description(),
  27. long_description_content_type="text/markdown",
  28. author="Guillaume Klein",
  29. url="https://github.com/SYSTRAN/faster-whisper",
  30. classifiers=[
  31. "Development Status :: 4 - Beta",
  32. "Intended Audience :: Developers",
  33. "Intended Audience :: Science/Research",
  34. "License :: OSI Approved :: MIT License",
  35. "Programming Language :: Python :: 3",
  36. "Programming Language :: Python :: 3 :: Only",
  37. "Programming Language :: Python :: 3.9",
  38. "Programming Language :: Python :: 3.10",
  39. "Programming Language :: Python :: 3.11",
  40. "Topic :: Scientific/Engineering :: Artificial Intelligence",
  41. ],
  42. keywords="openai whisper speech ctranslate2 inference quantization transformer",
  43. python_requires=">=3.9",
  44. install_requires=install_requires,
  45. extras_require={
  46. "conversion": conversion_requires,
  47. "dev": [
  48. "black==23.*",
  49. "flake8==6.*",
  50. "isort==5.*",
  51. "pytest==7.*",
  52. ],
  53. },
  54. packages=find_packages(),
  55. include_package_data=True,
  56. )