2014-10-01 18:41:58 +00:00
|
|
|
import os
|
2021-05-11 09:17:09 +00:00
|
|
|
import re
|
2016-12-11 16:50:46 +00:00
|
|
|
from codecs import open
|
2010-02-16 04:09:07 +00:00
|
|
|
|
2021-05-11 09:17:09 +00:00
|
|
|
from setuptools import find_packages, setup
|
2016-07-10 11:38:49 +00:00
|
|
|
|
2021-03-16 15:17:27 +00:00
|
|
|
# Based on https://github.com/pypa/sampleproject/blob/main/setup.py
|
2014-10-01 18:41:58 +00:00
|
|
|
# and https://python-packaging-user-guide.readthedocs.org/
|
2014-01-19 03:06:03 +00:00
|
|
|
|
2014-10-01 18:41:58 +00:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
2014-01-19 03:06:03 +00:00
|
|
|
|
2020-12-13 15:14:13 +00:00
|
|
|
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
|
2014-08-29 16:18:52 +00:00
|
|
|
long_description = f.read()
|
2020-12-13 18:56:33 +00:00
|
|
|
long_description_content_type = "text/markdown"
|
2014-09-08 22:06:10 +00:00
|
|
|
|
2017-12-30 16:54:23 +00:00
|
|
|
with open(os.path.join(here, "mitmproxy", "version.py")) as f:
|
2019-11-16 13:56:01 +00:00
|
|
|
match = re.search(r'VERSION = "(.+?)"', f.read())
|
|
|
|
assert match
|
|
|
|
VERSION = match.group(1)
|
2016-12-11 16:50:46 +00:00
|
|
|
|
2010-02-16 04:09:07 +00:00
|
|
|
setup(
|
2014-09-08 22:06:10 +00:00
|
|
|
name="mitmproxy",
|
2016-12-11 16:50:46 +00:00
|
|
|
version=VERSION,
|
2018-09-15 11:54:18 +00:00
|
|
|
description="An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.",
|
2014-09-08 22:06:10 +00:00
|
|
|
long_description=long_description,
|
2020-12-13 18:56:33 +00:00
|
|
|
long_description_content_type=long_description_content_type,
|
2014-10-01 18:41:58 +00:00
|
|
|
url="http://mitmproxy.org",
|
2014-09-08 22:06:10 +00:00
|
|
|
author="Aldo Cortesi",
|
|
|
|
author_email="aldo@corte.si",
|
2014-10-01 18:41:58 +00:00
|
|
|
license="MIT",
|
2014-09-08 22:06:10 +00:00
|
|
|
classifiers=[
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Environment :: Console :: Curses",
|
2019-12-16 02:10:32 +00:00
|
|
|
"Operating System :: MacOS",
|
2014-09-08 22:06:10 +00:00
|
|
|
"Operating System :: POSIX",
|
2016-02-18 12:03:40 +00:00
|
|
|
"Operating System :: Microsoft :: Windows",
|
2016-10-17 05:41:47 +00:00
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
2019-12-16 02:10:32 +00:00
|
|
|
"Programming Language :: Python :: 3.8",
|
2020-08-27 14:49:44 +00:00
|
|
|
"Programming Language :: Python :: 3.9",
|
2015-02-07 00:17:24 +00:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
2014-09-08 22:06:10 +00:00
|
|
|
"Topic :: Security",
|
|
|
|
"Topic :: Internet :: WWW/HTTP",
|
|
|
|
"Topic :: Internet :: Proxy Servers",
|
2019-12-16 02:10:32 +00:00
|
|
|
"Topic :: System :: Networking :: Monitoring",
|
|
|
|
"Topic :: Software Development :: Testing",
|
2019-12-29 12:19:39 +00:00
|
|
|
"Typing :: Typed",
|
2015-09-07 14:05:16 +00:00
|
|
|
],
|
2020-11-01 11:12:51 +00:00
|
|
|
project_urls={
|
|
|
|
'Documentation': 'https://docs.mitmproxy.org/stable/',
|
|
|
|
'Source': 'https://github.com/mitmproxy/mitmproxy/',
|
|
|
|
'Tracker': 'https://github.com/mitmproxy/mitmproxy/issues',
|
|
|
|
},
|
2016-02-18 12:03:40 +00:00
|
|
|
packages=find_packages(include=[
|
|
|
|
"mitmproxy", "mitmproxy.*",
|
|
|
|
]),
|
2014-10-01 18:41:58 +00:00
|
|
|
include_package_data=True,
|
2015-02-27 13:43:23 +00:00
|
|
|
entry_points={
|
2016-02-04 17:37:58 +00:00
|
|
|
'console_scripts': [
|
2016-10-19 02:25:39 +00:00
|
|
|
"mitmproxy = mitmproxy.tools.main:mitmproxy",
|
|
|
|
"mitmdump = mitmproxy.tools.main:mitmdump",
|
|
|
|
"mitmweb = mitmproxy.tools.main:mitmweb",
|
2016-02-04 17:37:58 +00:00
|
|
|
]
|
|
|
|
},
|
2020-12-05 23:25:09 +00:00
|
|
|
python_requires='>=3.8',
|
2016-02-04 17:37:58 +00:00
|
|
|
# https://packaging.python.org/en/latest/requirements/#install-requires
|
|
|
|
# It is not considered best practice to use install_requires to pin dependencies to specific versions.
|
|
|
|
install_requires=[
|
2021-06-28 17:03:30 +00:00
|
|
|
"asgiref>=3.2.10,<3.5",
|
2016-02-05 21:59:24 +00:00
|
|
|
"blinker>=1.4, <1.5",
|
2019-05-27 08:10:18 +00:00
|
|
|
"Brotli>=1.0,<1.1",
|
2019-09-28 10:29:07 +00:00
|
|
|
"certifi>=2019.9.11", # no semver here - this should always be on the last release!
|
2021-05-14 06:35:34 +00:00
|
|
|
"click>=7.0,<8.1",
|
2021-03-29 13:15:51 +00:00
|
|
|
"cryptography>=3.3,<3.5",
|
2021-05-14 06:35:34 +00:00
|
|
|
"flask>=1.1.1,<2.1",
|
2021-01-01 14:06:29 +00:00
|
|
|
"h11>=0.11,<0.13",
|
2020-12-05 23:25:09 +00:00
|
|
|
"h2>=4.0,<5",
|
|
|
|
"hyperframe>=6.0,<7",
|
2020-11-01 11:12:51 +00:00
|
|
|
"kaitaistruct>=0.7,<0.10",
|
2021-02-08 16:46:57 +00:00
|
|
|
"ldap3>=2.8,<2.10",
|
2020-07-21 14:30:35 +00:00
|
|
|
"msgpack>=1.0.0, <1.1.0",
|
2016-11-25 15:46:00 +00:00
|
|
|
"passlib>=1.6.5, <1.8",
|
2021-05-14 06:35:34 +00:00
|
|
|
"protobuf>=3.14,<3.18",
|
2020-11-27 22:41:05 +00:00
|
|
|
"pyOpenSSL>=20.0,<20.1",
|
2019-09-28 10:29:07 +00:00
|
|
|
"pyparsing>=2.4.2,<2.5",
|
2020-04-03 15:46:34 +00:00
|
|
|
"pyperclip>=1.6.0,<1.9",
|
2021-06-24 14:04:09 +00:00
|
|
|
"ruamel.yaml>=0.16,<0.17.11",
|
2021-05-24 10:54:31 +00:00
|
|
|
"sortedcontainers>=2.3,<2.5",
|
2019-10-06 12:41:46 +00:00
|
|
|
"tornado>=4.3,<7",
|
2020-07-29 22:02:16 +00:00
|
|
|
"urwid>=2.1.1,<2.2",
|
2020-12-12 23:06:15 +00:00
|
|
|
"wsproto>=1.0,<1.1",
|
2019-09-28 17:52:18 +00:00
|
|
|
"publicsuffix2>=2.20190812,<3",
|
2020-12-30 21:59:59 +00:00
|
|
|
"zstandard>=0.11,<0.16",
|
2016-02-04 17:37:58 +00:00
|
|
|
],
|
2014-09-08 22:06:10 +00:00
|
|
|
extras_require={
|
2016-02-04 17:37:58 +00:00
|
|
|
':sys_platform == "win32"': [
|
2017-10-22 16:06:44 +00:00
|
|
|
"pydivert>=2.0.3,<2.2",
|
2016-02-04 17:37:58 +00:00
|
|
|
],
|
|
|
|
'dev': [
|
2021-05-24 10:54:31 +00:00
|
|
|
"hypothesis>=5.8,<7",
|
2018-05-26 21:41:30 +00:00
|
|
|
"parver>=0.1,<2.0",
|
2021-02-02 22:34:26 +00:00
|
|
|
"pdoc>=4.0.0",
|
2021-07-13 12:10:10 +00:00
|
|
|
"pyinstaller==4.4",
|
2021-05-24 10:54:31 +00:00
|
|
|
"pytest-asyncio>=0.10.0,<0.16,!=0.14",
|
2019-09-28 17:52:18 +00:00
|
|
|
"pytest-cov>=2.7.1,<3",
|
|
|
|
"pytest-timeout>=1.3.3,<2",
|
2020-10-03 12:42:38 +00:00
|
|
|
"pytest-xdist>=2.1.0,<3",
|
|
|
|
"pytest>=6.1.0,<7",
|
2019-09-28 17:52:18 +00:00
|
|
|
"requests>=2.9.1,<3",
|
2020-10-03 12:42:38 +00:00
|
|
|
"tox>=3.5,<4",
|
2021-05-11 09:17:09 +00:00
|
|
|
"wheel>=0.36.2,<0.37"
|
|
|
|
],
|
2015-09-07 14:05:16 +00:00
|
|
|
}
|
|
|
|
)
|