-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
94 lines (82 loc) · 2.74 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
#############################################################################
#
# Setup based on Labelme install script:
# https://github.com/wkentaro/labelme
#
##############################################################################
import re
from setuptools import setup, find_packages
def get_version():
filename = "faceshine/__init__.py"
with open(filename) as f:
match = re.search(
r"""^__version__ = ['"]([^'"]*)['"]""", f.read(), re.M
)
if not match:
raise RuntimeError("{} doesn't contain __version__".format(filename))
version = match.groups()[0]
return version
def get_install_requires():
install_requires = [
"numpy>=1.24.3",
"torch>=2.0.0",
"opencv-python",
"flask>=2.3.2",
"flask_restful>=0.3.10",
"pillow>=9.5.0",
"torchvision",
"colorama",
"matplotlib",
"fastprogress",
"pandas",
"scipy",
"deoldify",
"realesrgan",
"zeroscratches",
"huggingface_hub"
]
return install_requires
def get_long_description():
with open("README.md") as f:
long_description = f.read()
try:
# when this package is being released
import github2pypi
return github2pypi.replace_url(
slug="leonelhs/face-shine", content=long_description, branch="main"
)
except ImportError:
# when this package is being installed
return long_description
def main():
setup(
name='faceshine',
version=get_version(),
long_description=get_long_description(),
long_description_content_type="text/markdown",
packages=find_packages(),
url='https://github.com/leonelhs/faceshine',
license='Apache',
author='leonel hernandez',
author_email='[email protected]',
description='Photo image enhancer',
install_requires=get_install_requires(),
package_data={"faceshine": []},
entry_points={"console_scripts": ["faceshine=faceshine.__main__:main"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
],
)
if __name__ == "__main__":
main()