]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
refactor(psycopg): convert setup.cfg to pyproject.toml
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 22 Dec 2024 01:26:17 +0000 (02:26 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 22 Dec 2024 16:41:16 +0000 (17:41 +0100)
Drop unneeded setup.py. The end of an era.

psycopg/pyproject.toml
psycopg/setup.cfg [deleted file]
psycopg/setup.py [deleted file]

index 21e410c74b3e8c7fade8709ffad94c2cd1debd2c..218b4f4e01ff6a256e2bd537ef2f8c7739944b1a 100644 (file)
@@ -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 (file)
index 4cf1eb4..0000000
+++ /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 (file)
index 2dad83c..0000000
+++ /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()