-
Notifications
You must be signed in to change notification settings - Fork 471
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
Migrate metadata from setup.py and setup.cfg to pyproject.toml #2517
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
exclude = build, ci-helpers | ||
ignore = |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,11 +2,11 @@ SORT_ARGS := -f -b | |||||||||
|
||||||||||
DICTIONARIES := codespell_lib/data/dictionary*.txt | ||||||||||
|
||||||||||
PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary check-manifest check-distutils flake8 pytest pypi clean | ||||||||||
PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary check-manifest check-pyproject flake8 pytest pypi clean | ||||||||||
|
||||||||||
all: check-dictionaries codespell.1 | ||||||||||
|
||||||||||
check: check-dictionaries check-manifest check-distutils flake8 pytest | ||||||||||
check: check-dictionaries check-manifest check-pyproject flake8 pytest | ||||||||||
|
||||||||||
check-dictionary: check-dictionaries | ||||||||||
sort-dictionary: sort-dictionaries | ||||||||||
|
@@ -47,8 +47,8 @@ trim-dictionaries: | |||||||||
check-manifest: | ||||||||||
check-manifest | ||||||||||
|
||||||||||
check-distutils: | ||||||||||
python setup.py check --restructuredtext --strict | ||||||||||
check-pyproject: | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May as well leave some backwards compatibility...
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||
validate-pyproject | ||||||||||
|
||||||||||
flake8: | ||||||||||
flake8 | ||||||||||
|
@@ -57,7 +57,7 @@ pytest: | |||||||||
pytest codespell_lib | ||||||||||
|
||||||||||
pypi: | ||||||||||
python setup.py sdist register upload | ||||||||||
sdist register upload | ||||||||||
|
||||||||||
clean: | ||||||||||
rm -rf codespell.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "codespell" | ||
dynamic = ["version"] | ||
maintainers = [{name = "Lucas De Marchi", email = "[email protected]"}] | ||
license = {text = "GPL v2"} | ||
description = "Codespell" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
] | ||
requires-python = ">=3.7" | ||
|
||
[project.readme] | ||
file = "README.rst" | ||
content-type = "text/x-rst" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/codespell-project/codespell/" | ||
Download = "https://github.com/codespell-project/codespell/releases" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"check-manifest", | ||
"flake8", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-dependency", | ||
"tomli", | ||
"validate-pyproject", | ||
] | ||
hard-encoding-detection = ["chardet"] | ||
toml = ["tomli"] | ||
|
||
[project.scripts] | ||
codespell = "codespell_lib:_script_main" | ||
|
||
[tool.setuptools] | ||
packages = [ | ||
"codespell_lib", | ||
"codespell_lib.tests", | ||
"codespell_lib.data", | ||
] | ||
zip-safe = false | ||
include-package-data = true | ||
platforms = ["any"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "codespell_lib.__version__"} | ||
|
||
[tool.setuptools.package-data] | ||
codespell_lib = [ | ||
"data/dictionary*.txt", | ||
"data/linux-kernel.exclude", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--cov=codespell_lib -rs --cov-report= --tb=short" |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would run the code twice under two different names.