-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
105 lines (83 loc) · 2.52 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
from distutils.core import setup
import os
from typing import Any
from setuptools import Distribution, setup
from setuptools.command.develop import develop
from setuptools.command.install import install
class PreDevelopCommand(develop):
"""Pre-installation for development mode."""
def __init__(self, dist: Distribution, **kw: Any):
make_inits()
super().__init__(dist, **kw)
def run(self):
make_inits()
develop.run(self)
make_inits()
class PreInstallCommand(install):
"""Pre-installation for installation mode."""
def __init__(self, dist: Distribution) -> None:
make_inits()
super().__init__(dist)
def run(self):
make_inits()
install.run(self)
make_inits()
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
class bdist_wheel(_bdist_wheel):
def __init__(self, dist: Distribution) -> None:
make_inits()
super().__init__(dist)
def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False
except ImportError:
bdist_wheel = None
def make_inits():
currentDir = os.path.dirname(__file__)
touch(os.path.join(currentDir, "./src/flowtron/__init__.py"))
touch(os.path.join(currentDir, "./src/flowtron/tacotron2/__init__.py"))
touch(os.path.join(currentDir, "./src/flowtron/tacotron2/waveglow/__init__.py"))
def touch(path: str):
basedir = os.path.dirname(path)
if not os.path.exists(basedir):
os.makedirs(basedir)
with open(path, "a"):
os.utime(path, None)
setup(
name="flowtron-module",
version="0.1.5",
description="Pipelining to allow using flowtron as a pip module",
author="NVIDIA",
author_email="[email protected]",
package_dir={
"flowtron": "src/flowtron",
"text": "src/flowtron/text",
"tacotron2": "src/flowtron/tacotron2",
"waveglow": "src/flowtron/tacotron2/waveglow",
},
packages=[
"flowtron",
"tacotron2",
"text",
"waveglow",
],
cmdclass={
"develop": PreDevelopCommand,
"install": PreInstallCommand,
"bdist_wheel": bdist_wheel,
},
setup_requires=["wheel"],
install_requires=[
"torch==1.7.1",
"matplotlib==3.3.2",
"numpy==1.19.2",
"inflect==4.1.0",
"librosa==0.6.3",
"scipy==1.5.2",
"Unidecode==1.0.22",
"pillow",
"tensorboardX",
],
license="Apache-2.0 License",
)