Skip to content

Commit dccf58c

Browse files
Use pyproject.toml instead of setup.py
Cherry-picked from: #599 Thanks to: Branch Vincent
1 parent 1f1eb17 commit dccf58c

File tree

3 files changed

+57
-108
lines changed

3 files changed

+57
-108
lines changed

pyproject.toml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
[project]
2+
name = "ptpython"
3+
version = "3.0.29"
4+
description = "Python REPL build on top of prompt_toolkit"
5+
readme = "README.rst"
6+
authors = [{ name = "Jonathan Slenders" }]
7+
classifiers = [
8+
"License :: OSI Approved :: BSD License",
9+
"Programming Language :: Python :: 3",
10+
"Programming Language :: Python :: 3.8",
11+
"Programming Language :: Python :: 3.9",
12+
"Programming Language :: Python :: 3.10",
13+
"Programming Language :: Python :: 3.11",
14+
"Programming Language :: Python :: 3.12",
15+
"Programming Language :: Python :: 3.13",
16+
"Programming Language :: Python :: 3 :: Only",
17+
"Programming Language :: Python",
18+
]
19+
requires-python = ">=3.8"
20+
dependencies = [
21+
"appdirs",
22+
"jedi>=0.16.0",
23+
# Use prompt_toolkit 3.0.43, because of `OneStyleAndTextTuple` import.
24+
"prompt_toolkit>=3.0.43,<3.1.0",
25+
"pygments",
26+
]
27+
28+
29+
[project.urls]
30+
Homepage = "https://github.com/prompt-toolkit/ptpython"
31+
Changelog = "https://github.com/prompt-toolkit/ptpython/blob/master/CHANGELOG"
32+
"Bug Tracker" = "https://github.com/prompt-toolkit/ptpython/issues"
33+
"Source Code" = "https://github.com/prompt-toolkit/ptpython"
34+
35+
36+
[project.scripts]
37+
ptpython = "ptpython.entry_points.run_ptpython:run"
38+
ptipython = "ptpython.entry_points.run_ptipython:run"
39+
40+
41+
[project.optional-dependencies]
42+
ptipython = ["ipython"] # For ptipython, we need to have IPython
43+
44+
45+
[tool.mypy]
46+
ignore_missing_imports = true
47+
no_implicit_optional = true
48+
platform = "win32"
49+
strict_equality = true
50+
strict_optional = true
51+
52+
153
[tool.ruff]
254
target-version = "py37"
355
lint.select = [
@@ -27,9 +79,13 @@ lint.ignore = [
2779
"ptpython/ipython.py" = ["T100"] # Import usage.
2880
"ptpython/repl.py" = ["T201"] # Print usage.
2981
"ptpython/printer.py" = ["T201"] # Print usage.
30-
"tests/run_tests.py" = ["F401"] # Unused imports.
3182

3283

3384
[tool.ruff.lint.isort]
3485
known-first-party = ["ptpython"]
3586
known-third-party = ["prompt_toolkit", "pygments", "asyncssh"]
87+
88+
89+
[build-system]
90+
requires = ["setuptools>=68"]
91+
build-backend = "setuptools.build_meta"

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)