File size: 4,712 Bytes
287c28c |
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
#!/usr/bin/env python
# ,*++++++*, ,*++++++*,
# *++. .+++ *++. .++*
# *+* ,++++* *+* *+* ,++++, *+*
# ,+, .++++++++++* ,++,,,,*+, ,++++++++++. *+,
# *+. .++++++++++++..++ *+.,++++++++++++. .+*
# .+* ++++++++++++.*+, .+*.++++++++++++ *+,
# .++ *++++++++* ++, .++.*++++++++* ++,
# ,+++*. . .*++, ,++*. .*+++*
# *+, .,*++**. .**++**. ,+*
# .+* *+,
# *+. Coqui .+*
# *+* +++ Trainer +++ *+*
# .+++*. . . *+++.
# ,+* *+++*... ...*+++* *+,
# .++. .""""+++++++****+++++++"""". ++.
# ,++. **** .++,
# .++* *++.
# *+++, ,+++*
# .,*++++::::::++++*,.
#
import os
import subprocess
import sys
from distutils.version import LooseVersion
import setuptools.command.build_py
import setuptools.command.develop
from setuptools import find_packages, setup
if LooseVersion(sys.version) < LooseVersion("3.6") or LooseVersion(
sys.version
) > LooseVersion("3.11"):
raise RuntimeError(
"Trainer requires python >= 3.6 and <=3.11 "
"but your Python version is {}".format(sys.version)
)
cwd = os.path.dirname(os.path.abspath(__file__))
cwd = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(cwd, "trainer", "VERSION")) as fin:
version = fin.read().strip()
class build_py(
setuptools.command.build_py.build_py
): # pylint: disable=too-many-ancestors
def run(self):
setuptools.command.build_py.build_py.run(self)
class develop(setuptools.command.develop.develop):
def run(self):
setuptools.command.develop.develop.run(self)
def pip_install(package_name):
subprocess.call([sys.executable, "-m", "pip", "install", package_name])
requirements = open(os.path.join(cwd, "requirements.txt"), "r").readlines()
with open(os.path.join(cwd, "requirements.dev.txt"), "r") as f:
requirements_dev = f.readlines()
with open(os.path.join(cwd, "requirements.test.txt"), "r") as f:
requirements_test = f.readlines()
requirements_all = requirements + requirements_dev + requirements_test
with open("README.md", "r", encoding="utf-8") as readme_file:
README = readme_file.read()
setup(
name="trainer",
version=version,
url="https://github.com/coqui-ai/Trainer",
author="Eren Gölge",
author_email="egolge@coqui.ai",
description="General purpose model trainer for PyTorch that is more flexible than it should be, by 🐸Coqui.",
long_description=README,
long_description_content_type="text/markdown",
license="Apache2",
# package
include_package_data=True,
packages=find_packages(include=["trainer*"]),
package_data={
"trainer": [
"VERSION",
]
},
project_urls={
"Documentation": "https://github.com/coqui-ai/Trainer/",
"Tracker": "https://github.com/coqui-ai/Trainer/issues",
"Repository": "https://github.com/coqui-ai/Trainer",
"Discussions": "https://github.com/coqui-ai/Trainer/discussions",
},
cmdclass={
"build_py": build_py,
"develop": develop,
},
install_requires=requirements,
extras_require={
"dev": requirements_dev,
"test": requirements_test,
"all": requirements_all
},
python_requires=">=3.6.0, <3.11",
classifiers=[
"Environment :: Console",
"Natural Language :: English",
# How mature is this project? Common values are
# 3 - Alpha, 4 - Beta, 5 - Production/Stable
"Development Status :: 3 - Alpha",
# Indicate who your project is intended for
"Intended Audience :: Developers",
# Pick your license as you wish
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
zip_safe=False,
)
|