diff --git a/.gitignore b/.gitignore index b6441d4..5022aed 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,8 @@ coverage.xml test/env* test/.python-version test/.env +test/run* +test/*old* # Translations *.mo diff --git a/pyproject.toml b/pyproject.toml index 8fe2f47..134ae6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,98 @@ [build-system] -requires = ["setuptools>=42", "wheel"] +requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" + +[project] +name = "pytimbr_sqla" +dynamic = ["version"] +description = "Timbr Python SQLAlchemy connector" +readme = "README.md" +license-files = ["LICENSE", "licenses/*"] +authors = [ + {name = "timbr", email = "contact@timbr.ai"} +] +maintainers = [ + {name = "timbr", email = "contact@timbr.ai"} +] +keywords = [ + "timbr", + "timbr-python", + "timbr-connector", + "python-connector", + "PyTimbr", + "pytimbr", + "py-timbr", + "Py-Timbr", + "pytimbr_sqla", + "pytimbr_Sqla", + "PyTimbr_Sqla", + "pytimbr_SQla", + "PyTimbr_SQla", + "pytimbr_SQLa", + "PyTimbr_SQLa", + "pytimbr_SQlA", + "PyTimbr_SQLA", + "pytimbrsqlalchemy", + "PyTimbrSqlalchemy", + "PyTimbrSQlalchemy", + "PyTimbrSQLalchemy", + "PyTimbrSQLAlchemy", + "Py-TimbrSQLAlchemy", + "py-timbrsqlalchemy", + "Py-Timbr-SQLAlchemy", + "py-timbr-sqlalchemy" +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" +] +requires-python = ">=3.9" +dependencies = [ + "future==1.0.0", + "python-dateutil==2.9.0", + "ldap3", + "thrift_sasl==0.4.3", + "pure-sasl>=0.6.2", + "sqlalchemy>=1.4.36,<2.0.0", + "requests_kerberos==0.15.0", + "pyhive==0.7.0" +] + +[project.urls] +Homepage = "https://github.com/WPSemantix/timbr_python_SQLAlchemy" +Download = "https://github.com/WPSemantix/timbr_python_SQLAlchemy/releases" +"Bug Tracker" = "https://github.com/WPSemantix/timbr_python_SQLAlchemy/issues" +Repository = "https://github.com/WPSemantix/timbr_python_SQLAlchemy" +Documentation = "https://github.com/WPSemantix/timbr_python_SQLAlchemy#readme" + +[project.entry-points."sqlalchemy.dialects"] +timbr = "pytimbr_sqla.sqlalchemy_timbr:TimbrDialect" +"timbr.http" = "pytimbr_sqla.sqlalchemy_timbr:TimbrHTTPDialect" +"timbr.https" = "pytimbr_sqla.sqlalchemy_timbr:TimbrHTTPSDialect" + +[tool.setuptools.packages.find] +include = ["pytimbr_sqla*", "TCLIService*", "thrift*"] + +[tool.setuptools.package-data] +"*" = ["*.txt", "*.md"] +"thrift.transport" = ["*.py"] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.dynamic] +version = {attr = "pytimbr_sqla.__version__"} + +[tool.setuptools.exclude-package-data] +"*" = ["test*", "tests*", "*.pyc", "__pycache__"] diff --git a/pytimbr_sqla/__init__.py b/pytimbr_sqla/__init__.py new file mode 100644 index 0000000..cb1e938 --- /dev/null +++ b/pytimbr_sqla/__init__.py @@ -0,0 +1,3 @@ +"""Timbr Python SQLAlchemy connector.""" + +__version__ = "2.0.0" diff --git a/setup.py b/setup.py index b4d802a..3f5f842 100644 --- a/setup.py +++ b/setup.py @@ -1,79 +1,5 @@ -import setuptools +# This file is kept for backward compatibility +# All configuration is now in pyproject.toml +from setuptools import setup -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -setuptools.setup( - name='pytimbr_sqla', - version='2.0.0', - author='timbr', - author_email='contact@timbr.ai', - description='Timbr Python SQLAlchemy connector', - long_description=long_description, - long_description_content_type="text/markdown", - url='https://github.com/WPSemantix/timbr_python_SQLAlchemy', - download_url = 'https://github.com/WPSemantix/timbr_python_SQLAlchemy/archive/refs/tags/v2.0.0.tar.gz', - project_urls={ - "Bug Tracker": "https://github.com/WPSemantix/timbr_python_SQLAlchemy/issues" - }, - license='MIT', - packages=['pytimbr_sqla', 'TCLIService', 'thrift', 'thrift.transport'], - install_requires=[ - 'future==1.0.0', - 'python-dateutil==2.9.0', - 'ldap3', - 'thrift_sasl==0.4.3', - 'pure-sasl>=0.6.2', - 'sqlalchemy>=1.4.36,<2.0.0', - 'requests_kerberos==0.15.0', - 'pyhive==0.7.0', - ], - extras_require={}, - package_data={}, - keywords = [ - 'timbr', - 'timbr-python', - 'timbr-connector', - 'python-connector', - 'PyTimbr', - 'pytimbr', - 'py-timbr', - 'Py-Timbr', - 'pytimbr_sqla', - 'pytimbr_Sqla', - 'PyTimbr_Sqla', - 'pytimbr_SQla', - 'PyTimbr_SQla', - 'pytimbr_SQLa', - 'PyTimbr_SQLa', - 'pytimbr_SQlA', - 'PyTimbr_SQLA', - 'pytimbrsqlalchemy', - 'PyTimbrSqlalchemy', - 'PyTimbrSQlalchemy', - 'PyTimbrSQLalchemy', - 'PyTimbrSQLAlchemy', - 'Py-TimbrSQLAlchemy', - 'py-timbrsqlalchemy', - 'Py-Timbr-SQLAlchemy', - 'py-timbr-sqlalchemy', - ], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - ], - entry_points={ - 'sqlalchemy.dialects': [ - 'timbr = pytimbr_sqla.sqlalchemy_timbr:TimbrDialect', - "timbr.http = pytimbr_sqla.sqlalchemy_timbr:TimbrHTTPDialect", - "timbr.https = pytimbr_sqla.sqlalchemy_timbr:TimbrHTTPSDialect", - ], - } -) +setup()