-
-
Notifications
You must be signed in to change notification settings - Fork 775
/
setup.py
64 lines (52 loc) · 1.92 KB
/
setup.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os
import sys
from pathlib import Path
from pkg_resources import VersionConflict, require
from setuptools import find_packages, setup
with open("README.md", mode="r", encoding="utf-8") as f:
long_description = f.read()
with open("requirements.txt", mode="r", encoding="utf-8") as f:
requirements = f.read().splitlines()
try:
require("setuptools>=38.3")
except VersionConflict:
print("Error: version of setuptools is too old (<38.3)!")
sys.exit(1)
ROOT_DIR = Path(__file__).parent.resolve()
# Creating the version file
with open("version.txt", mode="r", encoding="utf-8") as f:
version = f.read()
version = version.strip()
sha = "Unknown"
if os.getenv("BUILD_VERSION"):
version = os.getenv("BUILD_VERSION")
elif sha != "Unknown":
version += "+" + sha[:7]
print("-- Building version " + version)
version_path = ROOT_DIR / "pyannote" / "audio" / "version.py"
with open(version_path, mode="w", encoding="utf-8") as f:
f.write("__version__ = '{}'\n".format(version))
if __name__ == "__main__":
setup(
name="pyannote.audio",
namespace_packages=["pyannote"],
version=version,
packages=find_packages(),
install_requires=requirements,
description="Neural building blocks for speaker diarization",
long_description=long_description,
long_description_content_type="text/markdown",
author="Hervé Bredin",
author_email="[email protected]",
url="https://github.com/pyannote/pyannote-audio",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
],
)