forked from a-maliarov/amazoncaptcha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (52 loc) · 2.23 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
# -*- coding: utf-8 -*-
import setuptools
import os
# --------------------------------------------------------------------------------------------------------------
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'amazoncaptcha', '__version__.py'), 'r', encoding='utf-8') as f:
file_data = [i.replace('\n', '').replace('\'', '').split(' = ') for i in f.readlines()]
about = {k: v for k, v in file_data}
def readme(logo_end_line=14):
"""Extracts the logo from README file before pushing to PyPi."""
with open('README.md', 'r', encoding='utf-8') as fh:
long_description = ''.join(fh.readlines()[logo_end_line:])
return long_description
classifiers = [
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
]
requires = [
"pillow >= 9.0.1,< 10.4.0",
"requests >= 2.27.1,< 2.33.0"
]
# --------------------------------------------------------------------------------------------------------------
setuptools.setup(
name=about['__title__'],
version=about['__version__'],
description=about['__description__'],
packages=['amazoncaptcha'],
py_modules=['devtools', 'exceptions', 'solver', 'utils'],
include_package_data=True,
package_data={'': ['*.json'], 'amazoncaptcha': ['training_data/*.*']},
classifiers=classifiers,
long_description=readme(),
long_description_content_type="text/markdown",
install_requires=requires,
author=about['__author__'],
author_email=about['__author_email__'],
url=about['__url__'],
project_urls={
'Documentation': 'https://amazoncaptcha.readthedocs.io/en/latest/',
'Source': about['__url__'],
},
)
# --------------------------------------------------------------------------------------------------------------