-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
64 lines (53 loc) · 1.8 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
# coding=utf-8
import sys
from os.path import abspath, join, dirname
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
with open("README.rst") as fd:
long_description = fd.read()
def read_version():
p = join(abspath(dirname(__file__)), "freehp", "version.py")
with open(p, "rb") as f:
return f.read().decode("utf-8").split("=")[-1].strip().strip('"')
class PyTest(TestCommand):
def run_tests(self):
import pytest
errno = pytest.main(['tests'])
sys.exit(errno)
def main():
if sys.version_info < (3, 5, 3):
raise RuntimeError("Python 3.5.3+ is required")
install_requires = [
"aiohttp>=3.3.2,<4.0",
"lxml>=4.1.0,<5.0"
]
tests_requires = install_requires + ["pytest", "pytest-aiohttp"]
setup(
name="freehp",
version=read_version(),
url="https://github.com/jadbin/freehp",
description="Providing Free HTTP proxies",
long_description=long_description,
author="jadbin",
author_email="jadbin.com@hotmail.com",
license="Apache 2",
zip_safe=False,
packages=find_packages(exclude=("tests",)),
include_package_data=True,
entry_points={
"console_scripts": ["freehp = freehp.cli:main"]
},
install_requires=install_requires,
tests_require=tests_requires,
cmdclass={"test": PyTest},
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Topic :: Internet :: WWW/HTTP"
]
)
if __name__ == "__main__":
main()