2014-10-01 21:22:53 +00:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
from codecs import open
|
|
|
|
import os
|
2015-09-18 13:35:02 +00:00
|
|
|
import sys
|
2015-05-28 08:56:00 +00:00
|
|
|
|
2012-06-23 01:49:57 +00:00
|
|
|
from netlib import version
|
|
|
|
|
2014-10-01 21:22:53 +00:00
|
|
|
# Based on https://github.com/pypa/sampleproject/blob/master/setup.py
|
|
|
|
# and https://python-packaging-user-guide.readthedocs.org/
|
2015-05-28 08:56:00 +00:00
|
|
|
# and https://caremad.io/2014/11/distributing-a-cffi-project/
|
2014-09-08 16:58:07 +00:00
|
|
|
|
2014-10-01 21:22:53 +00:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
2012-06-23 01:49:57 +00:00
|
|
|
|
2015-11-29 18:04:19 +00:00
|
|
|
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
|
2014-09-08 16:58:07 +00:00
|
|
|
long_description = f.read()
|
|
|
|
|
2015-09-18 13:35:02 +00:00
|
|
|
deps = {
|
2015-12-03 16:56:57 +00:00
|
|
|
"pyasn1>=0.1.9, <0.2",
|
|
|
|
"pyOpenSSL>=0.15.1, <0.16",
|
2016-01-31 11:15:44 +00:00
|
|
|
"cryptography>=1.2.2, <1.3",
|
2015-12-03 16:56:57 +00:00
|
|
|
"passlib>=1.6.5, <1.7",
|
2016-02-02 16:39:49 +00:00
|
|
|
"hpack>=2.1.0, <3.0",
|
|
|
|
"hyperframe>=3.2.0, <4.0",
|
2015-12-03 16:56:57 +00:00
|
|
|
"six>=1.10.0, <1.11",
|
2016-01-31 11:15:44 +00:00
|
|
|
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
|
2015-12-25 14:56:26 +00:00
|
|
|
"backports.ssl_match_hostname>=3.5.0.1, <3.6",
|
2015-09-18 13:35:02 +00:00
|
|
|
}
|
|
|
|
if sys.version_info < (3, 0):
|
2015-12-03 16:56:57 +00:00
|
|
|
deps.add("ipaddress>=1.0.15, <1.1")
|
2015-09-18 13:35:02 +00:00
|
|
|
|
2012-06-23 01:49:57 +00:00
|
|
|
setup(
|
2014-09-08 16:58:07 +00:00
|
|
|
name="netlib",
|
|
|
|
version=version.VERSION,
|
|
|
|
description="A collection of network utilities used by pathod and mitmproxy.",
|
|
|
|
long_description=long_description,
|
2014-10-01 21:22:53 +00:00
|
|
|
url="http://github.com/mitmproxy/netlib",
|
2014-09-08 16:58:07 +00:00
|
|
|
author="Aldo Cortesi",
|
|
|
|
author_email="aldo@corte.si",
|
2014-10-01 21:22:53 +00:00
|
|
|
license="MIT",
|
2014-09-08 16:58:07 +00:00
|
|
|
classifiers=[
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Development Status :: 3 - Alpha",
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Programming Language :: Python :: 2",
|
2015-06-16 00:31:47 +00:00
|
|
|
"Programming Language :: Python :: 2.7",
|
2015-11-29 18:06:54 +00:00
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"Programming Language :: Python :: 3.5",
|
2015-02-07 00:43:25 +00:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
2014-09-08 16:58:07 +00:00
|
|
|
"Topic :: Internet",
|
|
|
|
"Topic :: Internet :: WWW/HTTP",
|
|
|
|
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
|
|
|
|
"Topic :: Software Development :: Testing",
|
|
|
|
"Topic :: Software Development :: Testing :: Traffic Generation",
|
|
|
|
],
|
2014-10-01 21:22:53 +00:00
|
|
|
packages=find_packages(),
|
|
|
|
include_package_data=True,
|
2015-05-28 08:56:00 +00:00
|
|
|
zip_safe=False,
|
2015-09-18 13:35:02 +00:00
|
|
|
install_requires=list(deps),
|
2014-09-08 16:58:07 +00:00
|
|
|
extras_require={
|
|
|
|
'dev': [
|
|
|
|
"mock>=1.0.1",
|
2015-09-20 17:56:57 +00:00
|
|
|
"pytest>=2.8.0",
|
|
|
|
"pytest-xdist>=1.13.1",
|
2015-09-20 23:08:19 +00:00
|
|
|
"pytest-cov>=2.1.0",
|
2016-01-31 13:16:03 +00:00
|
|
|
"pytest-timeout>=1.0.0",
|
2014-09-08 16:58:07 +00:00
|
|
|
"coveralls>=0.4.1",
|
2015-05-27 09:34:14 +00:00
|
|
|
"autopep8>=1.0.3",
|
|
|
|
"autoflake>=0.6.6",
|
2015-06-18 11:12:06 +00:00
|
|
|
"wheel>=0.24.0",
|
2015-06-26 11:26:35 +00:00
|
|
|
]
|
2015-05-28 08:56:00 +00:00
|
|
|
},
|
|
|
|
)
|