From: Daniele Varrazzo Date: Sun, 22 Dec 2024 01:26:17 +0000 (+0100) Subject: refactor(psycopg): convert setup.cfg to pyproject.toml X-Git-Tag: 3.3.0.dev1~141^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af709235bab4972739a07aa350b8fedaad7e4e35;p=thirdparty%2Fpsycopg.git refactor(psycopg): convert setup.cfg to pyproject.toml Drop unneeded setup.py. The end of an era. --- diff --git a/psycopg/pyproject.toml b/psycopg/pyproject.toml index 21e410c74..218b4f4e0 100644 --- a/psycopg/pyproject.toml +++ b/psycopg/pyproject.toml @@ -1,3 +1,102 @@ [build-system] requires = ["setuptools>=49.2.0", "wheel>=0.37"] build-backend = "setuptools.build_meta" + +[project] +name = "psycopg" +description = "PostgreSQL database adapter for Python" +version = "3.2.4.dev1" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Database", + "Topic :: Database :: Front-Ends", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries :: Python Modules", +] +requires-python = ">= 3.8" +dependencies = [ + "backports.zoneinfo >= 0.2.0; python_version < '3.9'", + "typing-extensions >= 4.6; python_version < '3.13'", + "tzdata; sys_platform == 'win32'", +] + +[[project.authors]] +name = "Daniele Varrazzo" +email = "daniele.varrazzo@gmail.com" + +[project.license] +text = "GNU Lesser General Public License v3 (LGPLv3)" + +[project.urls] +Homepage = "https://psycopg.org/" +Documentation = "https://psycopg.org/psycopg3/docs/" +Changes = "https://psycopg.org/psycopg3/docs/news.html" +Code = "https://github.com/psycopg/psycopg" +"Issue Tracker" = "https://github.com/psycopg/psycopg/issues" +Download = "https://pypi.org/project/psycopg/" + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.optional-dependencies] +c = [ + "psycopg-c == 3.2.4.dev1; implementation_name != \"pypy\"", +] +binary = [ + "psycopg-binary == 3.2.4.dev1; implementation_name != \"pypy\"", +] +pool = [ + "psycopg-pool", +] +test = [ + "anyio >= 4.0", + "mypy >= 1.14", + "pproxy >= 2.7", + "pytest >= 6.2.5", + "pytest-cov >= 3.0", + "pytest-randomly >= 3.5", +] +dev = [ + "ast-comments >= 1.1.2", + "black >= 24.1.0", + "codespell >= 2.2", + "dnspython >= 2.1", + "flake8 >= 4.0", + "mypy >= 1.14", + "types-setuptools >= 57.4", + "wheel >= 0.37", +] +docs = [ + "Sphinx >= 5.0", + "furo == 2022.6.21", + "sphinx-autobuild >= 2021.3.14", + "sphinx-autodoc-typehints >= 1.12", +] + +[tool.setuptools] +zip-safe = false +license-files = ["LICENSE.txt"] +include-package-data = true + +[tool.setuptools.package-data] +psycopg = [ + "py.typed", +] + +[tool.setuptools.packages.find] +namespaces = false diff --git a/psycopg/setup.cfg b/psycopg/setup.cfg deleted file mode 100644 index 4cf1eb42a..000000000 --- a/psycopg/setup.cfg +++ /dev/null @@ -1,92 +0,0 @@ -[metadata] -name = psycopg -description = PostgreSQL database adapter for Python -url = https://psycopg.org/psycopg3/ -author = Daniele Varrazzo -author_email = daniele.varrazzo@gmail.com -license = GNU Lesser General Public License v3 (LGPLv3) - -# Use a versioning scheme as defined in -# https://www.python.org/dev/peps/pep-0440/ - -# STOP AND READ! if you change: -version = 3.2.4.dev1 -# also change: -# - `docs/news.rst` to declare this as the current version or an unreleased one -# - `psycopg_c/setup.cfg`, and the extra dependencies below, to the same version. -# -# Check out tools/bump_version.py to help maintaining versions. - -project_urls = - Homepage = https://psycopg.org/ - Documentation = https://psycopg.org/psycopg3/docs/ - Changes = https://psycopg.org/psycopg3/docs/news.html - Code = https://github.com/psycopg/psycopg - Issue Tracker = https://github.com/psycopg/psycopg/issues - Download = https://pypi.org/project/psycopg/ - -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: 3.13 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Database - Topic :: Database :: Front-Ends - Topic :: Software Development - Topic :: Software Development :: Libraries :: Python Modules - -long_description = file: README.rst -long_description_content_type = text/x-rst -license_files = LICENSE.txt - -[options] -python_requires = >= 3.8 -packages = find: -zip_safe = False -install_requires = - backports.zoneinfo >= 0.2.0; python_version < "3.9" - typing-extensions >= 4.6; python_version < "3.13" - tzdata; sys_platform == "win32" - -[options.extras_require] -c = - psycopg-c == 3.2.4.dev1; implementation_name != "pypy" -binary = - psycopg-binary == 3.2.4.dev1; implementation_name != "pypy" -pool = - psycopg-pool -test = - anyio >= 4.0 - mypy >= 1.14 - pproxy >= 2.7 - pytest >= 6.2.5 - pytest-cov >= 3.0 - pytest-randomly >= 3.5 -dev = - ast-comments >= 1.1.2 - black >= 24.1.0 - codespell >= 2.2 - dnspython >= 2.1 - flake8 >= 4.0 - mypy >= 1.14 - types-setuptools >= 57.4 - wheel >= 0.37 -docs = - Sphinx >= 5.0 - furo == 2022.6.21 - sphinx-autobuild >= 2021.3.14 - sphinx-autodoc-typehints >= 1.12 - -[options.package_data] -psycopg = py.typed diff --git a/psycopg/setup.py b/psycopg/setup.py deleted file mode 100644 index 2dad83cdc..000000000 --- a/psycopg/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -""" -PostgreSQL database adapter for Python - pure Python package -""" - -# Copyright (C) 2020 The Psycopg Team - -from setuptools import setup - -setup()