Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement pyproject.toml for dependencies #767

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
[project]
name = "darker"
description = "Apply Black formatting only in regions changed since last commit"
authors = ["Antti Kaihola [email protected]"]
license = "BSD"
requires-python = ">=3.8"
# NOTE: remember to keep `.github/workflows/python-package.yml` in sync
# with the minimum required Python version
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"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"
]
[project.urls]
"Source Code" = "https://github.com/akaihola/darker"
"Change Log" = "https://github.com/akaihola/darker/blob/master/CHANGES.rst"
"News" = "https://github.com/akaihola/darker/discussions/categories/announcements"

[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"] # PEP 508 specifications.
build-backend = "setuptools.build_meta"

[tool.setuptools.package-data]
darker = ["py.typed", "pyi"]

[tool.setuptools.packages.find]
where = ["src"]

[project.dependencies]
# NOTE: remember to keep `constraints-oldest.txt` in sync with these
black = ">=22.3.0"
darkgraylib = "~=2.0.1"
toml = ">=0.10.0"
typing_extensions = ">=4.0.1"

[project.optional-dependencies]
flynt = ["flynt>=0.76"]
isort = ["isort>=5.0.1"]
color = ["Pygments>=2.4.0"]
test = [
"black>=22.3.0",
"cryptography>=3.3.2",
"defusedxml>=0.7.1",
"flynt>=0.76",
"isort>=5.0.1",
"mypy>=0.990",
"pathspec",
"pydocstyle",
"pygments",
"pylint<=3.2.7",
"pytest>=6.2.0",
"pytest-kwparametrize>=0.0.3",
"regex>=2021.4.4",
"requests_cache>=0.7",
"ruamel.yaml>=0.17.21",
"ruff>=0.0.292",
"twine>=2.0.0",
"types-requests>=2.27.9",
"types-toml>=0.10.4",
"urllib3>=1.25.9",
"wheel>=0.21.0"
]
release = ["darkgray-dev-tools~=0.1.1"]

[tool.black]
# Darker makes Black read its configuration from the file indicated by the `--config`
Expand Down
50 changes: 0 additions & 50 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ include_package_data = True
package_dir =
=src
packages = find:
install_requires =
# NOTE: remember to keep `constraints-oldest.txt` in sync with these
black>=22.3.0
darkgraylib~=2.0.1
toml>=0.10.0
typing_extensions>=4.0.1
# NOTE: remember to keep `.github/workflows/python-package.yml` in sync
# with the minimum required Python version
python_requires = >=3.8

[options.packages.find]
where = src

[options.package_data]
darker =
py.typed
.pyi

[options.entry_points]
darker.formatter =
Expand All @@ -51,39 +34,6 @@ darker.formatter =
console_scripts =
darker = darker.__main__:main_with_error_handling

[options.extras_require]
flynt =
flynt>=0.76
isort =
isort>=5.0.1
color =
Pygments>=2.4.0
test =
# NOTE: remember to keep `constraints-oldest.txt` in sync with these
black>=22.3.0
cryptography>=3.3.2 # through twine, fixes CVE-2020-36242
defusedxml>=0.7.1
flynt>=0.76
isort>=5.0.1
mypy>=0.990
pathspec # to test `gen_python_files` in `test_black_diff.py`
pydocstyle
pygments
pylint<=3.2.7 # pylint 3.3.0 dropped Python 3.8 support
pytest>=6.2.0
pytest-kwparametrize>=0.0.3
regex>=2021.4.4
requests_cache>=0.7
ruamel.yaml>=0.17.21
ruff>=0.0.292
twine>=2.0.0
types-requests>=2.27.9
types-toml>=0.10.4
urllib3>=1.25.9 # through requests-cache and twine, fixes CVE-2020-26137
wheel>=0.21.0
release =
darkgray-dev-tools~=0.1.1

[flake8]
# Line length according to Black rules
max-line-length = 88
Expand Down
Loading