From 2740db831ffb785a77c2922e9224889689820aed 2024-07-09 15:59:06 From: Lance Edgar Date: 2024-07-09 15:59:06 Subject: [PATCH] feat: switch from setup.cfg to pyproject.toml + hatchling --- diff --git a/.gitignore b/.gitignore index fe42cd9437f7f52857b67434e0564eb4144ecce4..0d18b0f5615d7380fa91e2d071c4ee3402aa85a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +*~ +*.pyc +dist/ sqlalchemy_pervasive.egg-info diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..917dfe19d2d67f3507b914a9bafae9edf943c036 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,40 @@ + +# Changelog +All notable changes to sqlalchemy-pervasive will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## 0.2.2 (2023-06-01) + +* Replace ``setup.py`` contents with ``setup.cfg``. + + +## 0.2.1 (2021-03-03) + +* Update author / homepage metadata. + + +## 0.2.0 (2021-03-03) + +* Officially declare "Python 3 only". + + +## 0.1.3 (2018-02-24) + +* Replace ``execfile()`` usage per python 3. + + +## 0.1.2 + +* Misc. housekeeping. Added manifest, transferred copyright, etc. + + +## 0.1.1 + +* Fixed boolean conditions in rendered SQL. + + +## 0.1.0 + +* Initial version. diff --git a/CHANGES.rst b/CHANGES.rst deleted file mode 100644 index 77d212e946da53c17aefae9e1983fdb75b61aac1..0000000000000000000000000000000000000000 --- a/CHANGES.rst +++ /dev/null @@ -1,41 +0,0 @@ - -0.2.2 (2023-06-01) ------------------- - -* Replace ``setup.py`` contents with ``setup.cfg``. - - -0.2.1 (2021-03-03) ------------------- - -* Update author / homepage metadata. - - -0.2.0 (2021-03-03) ------------------- - -* Officially declare "Python 3 only". - - -0.1.3 (2018-02-24) ------------------- - -* Replace ``execfile()`` usage per python 3. - - -0.1.2 ------ - -* Misc. housekeeping. Added manifest, transferred copyright, etc. - - -0.1.1 ------ - -* Fixed boolean conditions in rendered SQL. - - -0.1.0 ------ - -* Initial version. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..043637b4581732db1fd4f28081452c4fdb509ad7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,52 @@ + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + + +[project] +name = "sqlalchemy-pervasive" +version = "0.2.2" +description = "SQLAlchemy Dialect for Pervasive PSQL" +readme = "README.rst" +authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] +license = {text = "GNU GPL v3+"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "pyodbc", + "SQLAlchemy", +] + + +[project.entry-points."sqlalchemy.dialects"] +pervasive = "sqlalchemy_pervasive.pyodbc:PervasiveDialect_pyodbc" + + +[project.urls] +Homepage = "https://kallithea.rattailproject.org/rattail-project-contrib/sqlalchemy-pervasive" +Repository = "https://kallithea.rattailproject.org/rattail-project-contrib/sqlalchemy-pervasive" +Changelog = "https://kallithea.rattailproject.org/rattail-project-contrib/sqlalchemy-pervasive/files/master/CHANGELOG.md" + + +[tool.commitizen] +version_provider = "pep621" +tag_format = "v$version" +update_changelog_on_bump = true + + +[tool.nosetests] +nocapture = 1 +cover-package = "sqlalchemy_pervasive" +cover-erase = 1 +cover-inclusive = 1 +cover-html = 1 +cover-html-dir = "htmlcov" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5cbbd7c0021b87ca255f2ff8f37681b39e891e05..0000000000000000000000000000000000000000 --- a/setup.cfg +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8; -*- - -[nosetests] -nocapture = 1 -cover-package = sqlalchemy_pervasive -cover-erase = 1 -cover-inclusive = 1 -cover-html = 1 -cover-html-dir = htmlcov - - -[metadata] -name = sqlalchemy-pervasive -version = attr: sqlalchemy_pervasive.__version__ -author = Lance Edgar -author_email = lance@edbob.org -url = https://kallithea.rattailproject.org/rattail-project-contrib/sqlalchemy-pervasive -license = GNU GPL v3 -description = SQLAlchemy Dialect for Pervasive PSQL -long_description = file: README.rst -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Topic :: Software Development :: Libraries :: Python Modules - - -[options] -install_requires = - pyodbc - SQLAlchemy - -packages = find: -include_package_data = True - - -[options.packages.find] -exclude = tests - - -[options.entry_points] - -sqlalchemy.dialects = - pervasive = sqlalchemy_pervasive.pyodbc:PervasiveDialect_pyodbc diff --git a/setup.py b/setup.py deleted file mode 100644 index 3bb7de3a24a13843383d32889d331e0eb2715a39..0000000000000000000000000000000000000000 --- a/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8; -*- -################################################################################ -# -# sqlalchemy-pervasive -- SQLAlchemy Dialect for Pervasive PSQL -# Copyright © 2013-2023 Sacramento Natural Foods Co-op, Inc -# -# This file is part of sqlalchemy-pervasive. -# -# sqlalchemy-pervasive is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# sqlalchemy-pervasive is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# sqlalchemy-pervasive. If not, see . -# -################################################################################ - -from setuptools import setup - -setup() diff --git a/sqlalchemy_pervasive/_version.py b/sqlalchemy_pervasive/_version.py index 020ed73d7a09b032ea1b3291090cbbdeee5a181a..3d8fab5d7692a18aab9853048e2aee94b7009c6a 100644 --- a/sqlalchemy_pervasive/_version.py +++ b/sqlalchemy_pervasive/_version.py @@ -1 +1,6 @@ -__version__ = '0.2.2' +# -*- coding: utf-8; -*- + +from importlib.metadata import version + + +__version__ = version('sqlalchemy-pervasive')