-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
93 lines (85 loc) · 2.96 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
"""ProxyLists.
Get a list of free Proxy Servers
See:
https://github.com/phenobarbital/proxylists
"""
import ast
from os import path
from setuptools import setup, find_packages
def get_path(filename):
return path.join(path.dirname(path.abspath(__file__)), filename)
def readme():
with open(get_path('README.md'), encoding='utf-8') as rd:
return rd.read()
version = get_path('proxylists/version.py')
with open(version, 'r', encoding='utf-8') as meta:
# exec(meta.read())
t = compile(meta.read(), version, 'exec', ast.PyCF_ONLY_AST)
for node in (n for n in t.body if isinstance(n, ast.Assign)):
if len(node.targets) == 1:
name = node.targets[0]
if isinstance(name, ast.Name) and \
name.id in (
'__version__',
'__title__',
'__description__',
'__author__',
'__license__', '__author_email__'):
v = node.value
if name.id == '__version__':
__version__ = v.s
if name.id == '__title__':
__title__ = v.s
if name.id == '__description__':
__description__ = v.s
if name.id == '__license__':
__license__ = v.s
if name.id == '__author__':
__author__ = v.s
if name.id == '__author_email__':
__author_email__ = v.s
setup(
name='proxylists',
version=__version__,
python_requires=">=3.9.12",
url='https://github.com/phenobarbital/proxylists',
description=__description__,
long_description=readme(),
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
author=__author__,
author_email=__author_email__,
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
license=__license__,
license_file='LICENSE',
setup_requires=[
"asyncio==3.4.3"
],
install_requires=[
"asyncio==3.4.3",
"uvloop>=0.19.0",
"aiohttp>=3.9.3",
'requests>=2.28.2',
'requests[socks]>=2.28.2',
'lxml>=4.6.0'
],
tests_require=[
'pytest>=5.4.0',
'coverage'
],
project_urls={ # Optional
'Source': 'https://github.com/phenobarbital/proxylists',
'Tracker': 'https://github.com/phenobarbital/proxylists/issues',
'Documentation': 'https://github.com/phenobarbital/proxylists/',
'Funding': 'https://paypal.me/phenobarbital',
'Say Thanks!': 'https://saythanks.io/to/phenobarbital',
},
)