Skip to content

Commit

Permalink
Use pyproject.toml (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
muffinmad authored Nov 4, 2023
1 parent 47d404c commit bbaa123
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 67 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install build
- name: Build package
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

4 changes: 2 additions & 2 deletions anakinls/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import logging

from .server import server
from .version import __version__
from ._version import version

logging.basicConfig(level=logging.INFO)
logging.getLogger('pygls.protocol').setLevel(logging.WARN)
Expand Down Expand Up @@ -56,7 +56,7 @@ def main():
args = parser.parse_args()

if args.version:
print(inspect.cleandoc(f'''anakinls v{__version__}
print(inspect.cleandoc(f'''anakinls v{version}
Copyright (C) 2020 Andrii Kolomoiets
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Expand Down
2 changes: 2 additions & 0 deletions anakinls/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Will be generated by setuptools_scm
version = '1'
4 changes: 2 additions & 2 deletions anakinls/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from pygls.protocol import LanguageServerProtocol, lsp_method
from pygls.uris import to_fs_path

from .version import __version__ # type: ignore
from ._version import version

RE_WORD = re.compile(r'\w*')

Expand Down Expand Up @@ -128,7 +128,7 @@ def get_attr(o, *attrs):

server = LanguageServer(
name='anakinls',
version=__version__,
version=version,
protocol_cls=AnakinLanguageServerProtocol
)

Expand Down
22 changes: 0 additions & 22 deletions anakinls/version.py

This file was deleted.

37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[project]
name = "anakin-language-server"
dynamic = ["version"]
description = "Yet another Jedi Python language server"
readme = "README.md"
requires-python = ">=3.7.16"
dependencies = [
"jedi>=0.19.0",
"pygls>=1.1,<1.2",
"pyflakes~=2.2",
"pycodestyle~=2.5",
"yapf~=0.30",
]
license = {file = "LICENSE"}
authors = [{name = "Andrii Kolomoiets", email = "[email protected]"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Text Editors :: Integrated Development Environments (IDE)",
]

[project.urls]
"Homepage" = "https://github.com/muffinmad/anakin-language-server"
"Bug Reports" = "https://github.com/muffinmad/anakin-language-server/issues"
"Source" = "https://github.com/muffinmad/anakin-language-server"

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

[tool.setuptools_scm]
version_file = "anakinls/_version.py"

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

0 comments on commit bbaa123

Please sign in to comment.