Backed out changeset c8fefbece0f6 (bug 1774569) Backed out changeset 5ae4dd2cfcbe (bug 1774569) Backed out changeset e027acb00eb5 (bug 1774569) Backed out changeset 5b820a21a13c (bug 1774569) Backed out changeset 2b022e4e2607 (bug 1774569) Backed out changeset 39ff773cfa63 (bug 1734402)
54 lines
1.5 KiB
Python
54 lines
1.5 KiB
Python
import io
|
|
import os
|
|
import re
|
|
import sys
|
|
|
|
from setuptools import setup
|
|
|
|
needs_pytest = 'pytest' in set(sys.argv)
|
|
|
|
|
|
def get_version():
|
|
regex = r"__version__\s=\s\'(?P<version>[\d\.ab]+?)\'"
|
|
|
|
path = ('idna_ssl.py',)
|
|
|
|
return re.search(regex, read(*path)).group('version')
|
|
|
|
|
|
def read(*parts):
|
|
filename = os.path.join(os.path.abspath(os.path.dirname(__file__)), *parts)
|
|
|
|
with io.open(filename, encoding='utf-8', mode='rt') as fp:
|
|
return fp.read()
|
|
|
|
|
|
setup(
|
|
name='idna-ssl',
|
|
version=get_version(),
|
|
author='Victor Kovtun',
|
|
author_email='hellysmile@gmail.com',
|
|
url='https://github.com/aio-libs/idna-ssl',
|
|
description='Patch ssl.match_hostname for Unicode(idna) domains support',
|
|
long_description=read('README.rst'),
|
|
setup_requires=['pytest-runner'] if needs_pytest else [],
|
|
tests_require=['pytest', 'pytest-asyncio', 'pytest-cov', 'aiohttp>2.3'],
|
|
py_modules=['idna_ssl'],
|
|
install_requires=['idna>=2.0'],
|
|
include_package_data=True,
|
|
zip_safe=False,
|
|
classifiers=[
|
|
'Development Status :: 4 - Beta',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Programming Language :: Python',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.3',
|
|
'Programming Language :: Python :: 3.4',
|
|
'Programming Language :: Python :: 3.5',
|
|
'Programming Language :: Python :: 3.6',
|
|
'Programming Language :: Python :: 3.7',
|
|
],
|
|
keywords=['ssl', 'Unicode', 'idna', 'match_hostname'],
|
|
)
|