Skip to content

Commit 5001f94

Browse files
authored
migrate setup.py to pyproject.toml (#1465)
* migrate setup.py to pyproject.toml * set homepage link to https in pyproject
1 parent 9b6925e commit 5001f94

File tree

4 files changed

+74
-71
lines changed

4 files changed

+74
-71
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Contributors:
135135
* Andrew M. MacFie (amacfie)
136136
* saucoide
137137
* Chris Rose (offbyone/offby1)
138+
* Mathieu Dupuy (deronnax)
138139
* Chris Novakovic
139140

140141
Creator:

changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Dev
44
Features
55
--------
66
* Add a `--ping` command line option; allows pgcli to replace `pg_isready`
7+
* Changed the packaging metadata from setup.py to pyproject.toml
78

89
Bug fixes:
910
----------

pyproject.toml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
1+
[project]
2+
name = "pgcli"
3+
authors = [{ name = "Pgcli Core Team", email = "[email protected]" }]
4+
license = { text = "BSD" }
5+
description = "CLI for Postgres Database. With auto-completion and syntax highlighting."
6+
readme = "README.rst"
7+
classifiers = [
8+
"Intended Audience :: Developers",
9+
"License :: OSI Approved :: BSD License",
10+
"Operating System :: Unix",
11+
"Programming Language :: Python",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.8",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: SQL",
19+
"Topic :: Database",
20+
"Topic :: Database :: Front-Ends",
21+
"Topic :: Software Development",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
]
24+
urls = { Homepage = "https://pgcli.com" }
25+
requires-python = ">=3.8"
26+
dependencies = [
27+
"pgspecial>=2.0.0",
28+
"click >= 4.1",
29+
"Pygments>=2.0", # Pygments has to be Capitalcased. WTF?
30+
# We still need to use pt-2 unless pt-3 released on Fedora32
31+
# see: https://github.com/dbcli/pgcli/pull/1197
32+
"prompt_toolkit>=2.0.6,<4.0.0",
33+
"psycopg >= 3.0.14; sys_platform != 'win32'",
34+
"psycopg-binary >= 3.0.14; sys_platform == 'win32'",
35+
"sqlparse >=0.3.0,<0.6",
36+
"configobj >= 5.0.6",
37+
"cli_helpers[styles] >= 2.2.1",
38+
# setproctitle is used to mask the password when running `ps` in command line.
39+
# But this is not necessary in Windows since the password is never shown in the
40+
# task manager. Also setproctitle is a hard dependency to install in Windows,
41+
# so we'll only install it if we're not in Windows.
42+
"setproctitle >= 1.1.9; sys_platform != 'win32' and 'CYGWIN' not in sys_platform",
43+
]
44+
dynamic = ["version"]
45+
46+
47+
[project.scripts]
48+
pgcli = "pgcli.main:cli"
49+
50+
[project.optional-dependencies]
51+
keyring = ["keyring >= 12.2.0"]
52+
sshtunnel = ["sshtunnel >= 0.4.0"]
53+
54+
[build-system]
55+
requires = ["setuptools>=61.2"]
56+
build-backend = "setuptools.build_meta"
57+
58+
[tool.setuptools]
59+
include-package-data = false
60+
61+
[tool.setuptools.dynamic]
62+
version = { attr = "pgcli.__version__" }
63+
64+
[tool.setuptools.packages]
65+
find = { namespaces = false }
66+
67+
[tool.setuptools.package-data]
68+
pgcli = [
69+
"pgclirc",
70+
"packages/pgliterals/pgliterals.json",
71+
]
72+
173
[tool.black]
274
line-length = 88
375
target-version = ['py38']

setup.py

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)