diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2022-12-30 15:44:37 +0100 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2022-12-30 16:04:26 +0100 |
commit | 8b789f286e1b6cbf05c15020ea7544cb7f02f8f7 (patch) | |
tree | 8709b5696a372b2c71cf0b2b65f494941d513471 | |
parent | cda0e499a1c762662d2b06b18e7b4aed2da75bc7 (diff) | |
download | sqlparse-8b789f286e1b6cbf05c15020ea7544cb7f02f8f7.tar.gz |
Switch to pyproject.toml (fixes #685).
-rw-r--r-- | .github/workflows/python-app.yml | 9 | ||||
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | MANIFEST.in | 11 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | pyproject.toml | 70 | ||||
-rw-r--r-- | setup.cfg | 55 | ||||
-rw-r--r-- | setup.py | 12 |
7 files changed, 80 insertions, 83 deletions
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index fef18a5..906ca7e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,7 +5,8 @@ name: Python application on: push: - branches: [ master ] + branches: + - master pull_request: branches: [ master ] schedule: @@ -27,9 +28,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install codecov flake8 pytest pytest-cov - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + python -m pip install --upgrade pip flit + flit install --deps=develop + pip install codecov - name: Lint with flake8 run: flake8 sqlparse --count --max-complexity=31 --show-source --statistics - name: Test with pytest @@ -8,6 +8,10 @@ Bug Fixes comparison operator. That also follows the definition of reserved keywords for the major SQL syntax definitions. +Other + +* sqlparse now uses pyproject.toml instead of setup.cfg (issue685). + Release 0.4.3 (Sep 23, 2022) ---------------------------- diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 8043b35..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,11 +0,0 @@ -recursive-include docs source/* -include docs/sqlformat.1 -include docs/Makefile -recursive-include tests *.py *.sql -include LICENSE -include TODO -include AUTHORS -include CHANGELOG -include Makefile -include setup.cfg -include tox.ini @@ -22,5 +22,5 @@ clean: release: @rm -rf dist/ - python setup.py sdist bdist_wheel + python -m build twine upload --sign --identity E0B84F81 dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..338a53c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,70 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "sqlparse" +description = "A non-validating SQL parser." +authors = [{name = "Andi Albrecht", email = "albrecht.andi@gmail.com"}] +readme = "README.rst" +dynamic = ["version"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Database", + "Topic :: Software Development", +] +requires-python = ">=3.5" + +[project.urls] +Home = "https://github.com/andialbrecht/sqlparse" +Documentation = "https://sqlparse.readthedocs.io/" +"Release Notes" = "https://sqlparse.readthedocs.io/en/latest/changes/" +Source = "https://github.com/andialbrecht/sqlparse" +Tracker = "https://github.com/andialbrecht/sqlparse/issues" + +[project.scripts] +sqlformat = "sqlparse.__main__:main" + +[project.optional-dependencies] +dev = [ + "flake8", + "build", +] +test = [ + "pytest", + "pytest-cov", +] +doc = [ + "sphinx", +] + +[tool.flit.sdist] +include = [ + "docs/source/", + "docs/sqlformat.1", + "docs/Makefile", + "tests/*.py", "tests/files/*.sql", + "LICENSE", + "TODO", + "AUTHORS", + "CHANGELOG", + "Makefile", + "tox.ini", +] + +[tool.coverage.run] +omit = ["sqlparse/__main__.py"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 0843b70..0000000 --- a/setup.cfg +++ /dev/null @@ -1,55 +0,0 @@ -[metadata] -name = sqlparse -version = attr: sqlparse.__version__ -url = https://github.com/andialbrecht/sqlparse -author = Andi Albrecht -author_email = albrecht.andi@gmail.com -description = A non-validating SQL parser. -long_description = file: README.rst -license = BSD-3-Clause -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Database - Topic :: Software Development -project_urls = - Documentation = https://sqlparse.readthedocs.io/ - Release Notes = https://sqlparse.readthedocs.io/en/latest/changes/ - Source = https://github.com/andialbrecht/sqlparse - Tracker = https://github.com/andialbrecht/sqlparse/issues - -[options] -python_requires = >=3.5 -packages = find: - -[options.packages.find] -exclude = tests - -[options.entry_points] -console_scripts = - sqlformat = sqlparse.__main__:main - -[tool:pytest] -xfail_strict = True - -[flake8] -extend-ignore = - E731 - -[coverage:run] -branch = False -omit = - sqlparse/__main__.py diff --git a/setup.py b/setup.py deleted file mode 100644 index ede0aff..0000000 --- a/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2009-2020 the sqlparse authors and contributors -# <see AUTHORS file> -# -# This setup script is part of python-sqlparse and is released under -# the BSD License: https://opensource.org/licenses/BSD-3-Clause - -from setuptools import setup - - -setup() |