Skip to content

Commit

Permalink
Move the project metadata into PEP 621-compliant pyproject.toml (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH authored May 9, 2022
1 parent 4bffc39 commit bf9d5fa
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 89 deletions.
91 changes: 90 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,96 @@
[build-system]
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"]
requires = ["setuptools>=61.2.0", "wheel", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[project]
name = "python-lsp-server"
authors = [{name = "Python Language Server Contributors"}]
description = "Python Language Server for the Language Server Protocol"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.7"
dependencies = [
"jedi>=0.17.2,<0.19.0",
"python-lsp-jsonrpc>=1.0.0",
"pluggy>=1.0.0",
"ujson>=3.0.0",
"setuptools>=39.0.0",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/python-lsp/python-lsp-server"

[project.optional-dependencies]
all = [
"autopep8>=1.6.0,<1.7.0",
"flake8>=4.0.0,<4.1.0",
"mccabe>=0.6.0,<0.7.0",
"pycodestyle>=2.8.0,<2.9.0",
"pydocstyle>=2.0.0",
"pyflakes>=2.4.0,<2.5.0",
"pylint>=2.5.0",
"rope>=0.10.5",
"yapf",
]
autopep8 = ["autopep8>=1.6.0,<1.7.0"]
flake8 = ["flake8>=4.0.0,<4.1.0"]
mccabe = ["mccabe>=0.6.0,<0.7.0"]
pycodestyle = ["pycodestyle>=2.8.0,<2.9.0"]
pydocstyle = ["pydocstyle>=2.0.0"]
pyflakes = ["pyflakes>=2.4.0,<2.5.0"]
pylint = ["pylint>=2.5.0"]
rope = ["rope>0.10.5"]
yapf = ["yapf"]
test = [
"pylint>=2.5.0",
"pytest",
"pytest-cov",
"coverage",
"numpy",
"pandas",
"matplotlib",
"pyqt5",
"flaky",
]

[project.entry-points.pylsp]
autopep8 = "pylsp.plugins.autopep8_format"
folding = "pylsp.plugins.folding"
flake8 = "pylsp.plugins.flake8_lint"
jedi_completion = "pylsp.plugins.jedi_completion"
jedi_definition = "pylsp.plugins.definition"
jedi_hover = "pylsp.plugins.hover"
jedi_highlight = "pylsp.plugins.highlight"
jedi_references = "pylsp.plugins.references"
jedi_rename = "pylsp.plugins.jedi_rename"
jedi_signature_help = "pylsp.plugins.signature"
jedi_symbols = "pylsp.plugins.symbols"
mccabe = "pylsp.plugins.mccabe_lint"
preload = "pylsp.plugins.preload_imports"
pycodestyle = "pylsp.plugins.pycodestyle_lint"
pydocstyle = "pylsp.plugins.pydocstyle_lint"
pyflakes = "pylsp.plugins.pyflakes_lint"
pylint = "pylsp.plugins.pylint_lint"
rope_completion = "pylsp.plugins.rope_completion"
rope_rename = "pylsp.plugins.rope_rename"
yapf = "pylsp.plugins.yapf_format"

[project.scripts]
pylsp = "pylsp.__main__:main"

[tool.setuptools]
license-files = ["LICENSE"]
include-package-data = false

[tool.setuptools.packages.find]
exclude = ["contrib", "docs", "test", "test.*", "test.plugins", "test.plugins.*"]
namespaces = false

[tool.setuptools_scm]
write_to = "pylsp/_version.py"
write_to_template = "__version__ = \"{version}\"\n" # VERSION_INFO is populated in __main__

[tool.pytest.ini_options]
testpaths = ["test"]
addopts = "--cov-report html --cov-report term --junitxml=pytest.xml --cov pylsp --cov test"
87 changes: 0 additions & 87 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,91 +1,4 @@
[metadata]
name = python-lsp-server
author = Python Language Server Contributors
description = Python Language Server for the Language Server Protocol
url = https://github.com/python-lsp/python-lsp-server
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
license_file = LICENSE

[options]
packages = find:
python_requires = >=3.7
install_requires =
jedi>=0.17.2,<0.19.0
python-lsp-jsonrpc>=1.0.0
pluggy>=1.0.0
ujson>=3.0.0
setuptools>=39.0.0
setup_requires = setuptools>=44; wheel; setuptools_scm[toml]>=3.4.3

[options.packages.find]
exclude = contrib; docs; test; test.*; test.plugins; test.plugins.*

[options.extras_require]
all =
autopep8>=1.6.0,<1.7.0
flake8>=4.0.0,<4.1.0
mccabe>=0.6.0,<0.7.0
pycodestyle>=2.8.0,<2.9.0
pydocstyle>=2.0.0
pyflakes>=2.4.0,<2.5.0
pylint>=2.5.0
rope>=0.10.5
yapf
autopep8 = autopep8>=1.6.0,<1.7.0
flake8 = flake8>=4.0.0,<4.1.0
mccabe = mccabe>=0.6.0,<0.7.0
pycodestyle = pycodestyle>=2.8.0,<2.9.0
pydocstyle = pydocstyle>=2.0.0
pyflakes = pyflakes>=2.4.0,<2.5.0
pylint = pylint>=2.5.0
rope = rope>0.10.5
yapf = yapf
test =
pylint>=2.5.0
pytest
pytest-cov
coverage
numpy
pandas
matplotlib
pyqt5
flaky

[options.entry_points]
console_scripts = pylsp = pylsp.__main__:main
pylsp =
autopep8 = pylsp.plugins.autopep8_format
folding = pylsp.plugins.folding
flake8 = pylsp.plugins.flake8_lint
jedi_completion = pylsp.plugins.jedi_completion
jedi_definition = pylsp.plugins.definition
jedi_hover = pylsp.plugins.hover
jedi_highlight = pylsp.plugins.highlight
jedi_references = pylsp.plugins.references
jedi_rename = pylsp.plugins.jedi_rename
jedi_signature_help = pylsp.plugins.signature
jedi_symbols = pylsp.plugins.symbols
mccabe = pylsp.plugins.mccabe_lint
preload = pylsp.plugins.preload_imports
pycodestyle = pylsp.plugins.pycodestyle_lint
pydocstyle = pylsp.plugins.pydocstyle_lint
pyflakes = pylsp.plugins.pyflakes_lint
pylint = pylsp.plugins.pylint_lint
rope_completion = pylsp.plugins.rope_completion
rope_rename = pylsp.plugins.rope_rename
yapf = pylsp.plugins.yapf_format

[pycodestyle]
ignore = E226, E722, W504
max-line-length = 120
exclude = test/plugins/.ropeproject,test/.ropeproject


[tool:pytest]
testpaths = test
addopts =
--cov-report html --cov-report term --junitxml=pytest.xml
--cov pylsp --cov test

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
if __name__ == "__main__":
setup(
name="python-lsp-server", # to allow GitHub dependency tracking work
packages=find_packages(exclude=["contrib", "docs", "test", "test.*"]), # https://github.com/pypa/setuptools/issues/2688
)

0 comments on commit bf9d5fa

Please sign in to comment.