Skip to content

Commit

Permalink
build: move project setup to pyproject.toml
Browse files Browse the repository at this point in the history
There is a subtle difference with the Home-Page field
in setuptools not being set via pypoject.toml.

The version of setuptools has been bumped to 61+ to at least
map the url "homepage" to Home-Page in PyPi.
See relevant Issue on pypa:
pypa/packaging-problems#606
  • Loading branch information
gnikit committed May 5, 2024
1 parent da01db1 commit ec7975b
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 81 deletions.
85 changes: 80 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,86 @@
[build-system]
requires = [
"setuptools >= 45",
"wheel",
"setuptools_scm[toml] >= 7.0",
]
requires = ["setuptools >= 61", "wheel", "setuptools_scm[toml] >= 7.0"]
build-backend = "setuptools.build_meta"

[project]
name = "fortls"
description = "fortls - Fortran Language Server"
readme = "README.md"
authors = [{ name = "Giannis Nikiteas", email = "[email protected]" }]
license = { text = "MIT" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Fortran",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
keywords = [
"fortran",
"language server",
"language server protocol",
"lsp",
"fortls",
]
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = [
"json5",
"packaging",
"importlib-metadata; python_version < '3.8'",
"typing-extensions; python_version < '3.8'",
]

[project.optional-dependencies]
dev = [
"pytest >= 7.2.0",
"pytest-cov >= 4.0.0",
"pytest-xdist >= 3.0.2",
"black",
"isort",
"pre-commit",
"pydantic",
]
docs = [
"sphinx >= 4.0.0",
"sphinx-argparse",
"sphinx-autodoc-typehints",
"sphinx_design",
"sphinx-copybutton",
"furo",
"myst-parser",
"sphinx-sitemap",
]

[project.urls]
homepage = "https://fortls.fortran-lang.org"
Documentation = "https://fortls.fortran-lang.org"
Changes = "https://github.com/fortran-lang/fortls/blob/master/CHANGELOG.md"
Tracker = "https://github.com/fortran-lang/fortls/issues"
"Source Code" = "https://github.com/fortran-lang/fortls"

[project.scripts]
fortls = "fortls.__init__:main"

[tool.setuptools.packages.find]
include = ["fortls"]

This comment has been minimized.

Copy link
@band-a-prend

band-a-prend May 6, 2024

@gnikit, hello.
Is should include = ["fortls*"] be here instead? With the current include = ["fortls"] I got setuptools configuration warning:

 Package 'fortls.parsers' is absent from the `packages` configuration.
 Package 'fortls.parsers.internal' is absent from the `packages` configuration.

This comment has been minimized.

Copy link
@gnikit

gnikit May 6, 2024

Author Member

I see the warning too, but when you inflate the wheel or the tarball everything is correctly packaged.

This comment has been minimized.

Copy link
@gnikit

gnikit May 6, 2024

Author Member

There is definitely something wrong with my new confg I will look into it. Thanks @band-a-prend

This comment has been minimized.

Copy link
@gnikit

gnikit May 6, 2024

Author Member

Getting fixed in #389

This comment has been minimized.

Copy link
@band-a-prend

band-a-prend May 6, 2024

Thanks!


[tool.setuptools.package-data]
fortls = ["parsers/internal/*.json"]

[tool.setuptools_scm]
write_to = "fortls/_version.py"

Expand Down
76 changes: 0 additions & 76 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,79 +1,3 @@
[metadata]
name = fortls
url = https://fortls.fortran-lang.org
author = Giannis Nikiteas
author_email = [email protected]
description = fortls - Fortran Language Server
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
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
Programming Language :: Fortran
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
keywords =
fortran
language server
language server protocol
lsp
fortls
project_urls =
# Donate = https://github.com/sponsors/gnikit
Documentation = https://fortls.fortran-lang.org
Changes = https://github.com/fortran-lang/fortls/blob/master/CHANGELOG.md
Tracker = https://github.com/fortran-lang/fortls/issues
Source Code = https://github.com/fortran-lang/fortls

[options]
packages = find:
python_requires = >= 3.7
install_requires =
json5
packaging
importlib-metadata; python_version < "3.8"
typing-extensions; python_version < "3.8"

[options.package_data]
fortls = parsers/internal/*.json

[options.entry_points]
console_scripts =
fortls = fortls.__init__:main

[options.extras_require]
dev =
pytest >= 7.2.0
pytest-cov >= 4.0.0
pytest-xdist >= 3.0.2
black
isort
pre-commit
pydantic
docs =
sphinx >= 4.0.0
sphinx-argparse
sphinx-autodoc-typehints
sphinx_design
sphinx-copybutton
furo
myst-parser
sphinx-sitemap

[flake8]
max-line-length = 88
extend-ignore = E203, E722

0 comments on commit ec7975b

Please sign in to comment.