diff --git a/setup.py b/setup.py index 28543f18..56b72ee4 100755 --- a/setup.py +++ b/setup.py @@ -14,22 +14,21 @@ import ast import re -from setuptools import setup import textwrap +from setuptools import setup _version_re = re.compile(r"__version__\s+=\s+(.*)") - with open("trino/__init__.py", "rb") as f: version = str( ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)) ) - kerberos_require = ["requests_kerberos"] +sqlalchemy_require = ["sqlalchemy~=1.3"] -all_require = [kerberos_require] +all_require = kerberos_require + sqlalchemy_require tests_require = all_require + ["httpretty", "pytest", "pytest-runner", "pytz", "flake8"] @@ -42,21 +41,17 @@ packages=["trino"], package_data={"": ["LICENSE", "README.md"]}, description="Client for the Trino distributed SQL Engine", - long_description=textwrap.dedent( - """ - Client for Trino (https://trino.io), a distributed SQL engine for - interactive and batch big data processing. Provides a low-level client and - a DBAPI 2.0 implementation. - """ - ), + long_description=textwrap.dedent(""" + Client for Trino (https://trino.io), a distributed SQL engine for + interactive and batch big data processing. Provides a low-level client and + a DBAPI 2.0 implementation. + """), license="Apache 2.0", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Operating System :: Microsoft :: Windows", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", @@ -66,6 +61,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Database", "Topic :: Database :: Front-Ends", ], python_requires='>=3.5', @@ -73,6 +69,12 @@ extras_require={ "all": all_require, "kerberos": kerberos_require, + "sqlalchemy": sqlalchemy_require, "tests": tests_require, }, + entry_points={ + "sqlalchemy.dialects": [ + "trino = trino.sqlalchemy.dialect.TrinoDialect", + ] + }, )