Skip to content

Commit

Permalink
packaging: switch to pyproject.toml
Browse files Browse the repository at this point in the history
Prefer pyproject.toml over setup.cfg for packaging. The changes in the
build results are minimal, only PKG-INFO changes:

-Home-page: https://github.com/jnikula/hawkmoth
-Author: Jani Nikula
-Author-email: [email protected]
+Author-email: Jani Nikula <[email protected]>
 License: BSD-2-Clause
+Project-URL: Homepage, https://github.com/jnikula/hawkmoth

Flake8 configuration remains in setup.cfg.
  • Loading branch information
jnikula committed May 1, 2024
1 parent 93e44ca commit fb4c946
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 61 deletions.
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,58 @@ requires = [
"wheel"
]
build-backend = "setuptools.build_meta"

[project]
name = "hawkmoth"
dynamic = ["version"]
description = "Hawkmoth - Sphinx Autodoc for C"
readme = {file = "README.rst", content-type = "text/x-rst"}
license = {text = "BSD-2-Clause"}
requires-python = "~=3.8"
authors = [
{name = "Jani Nikula", email = "[email protected]"},
]
keywords = [
"autodoc",
"c",
"documentation",
"python",
"sphinx",
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Sphinx :: Extension",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Documentation :: Sphinx",
"Topic :: Software Development :: Documentation",
]
dependencies = [
"sphinx >= 3",
]

[project.optional-dependencies]
dev = [
"flake8",
"pytest",
"pytest-cov",
"pytest-xdist",
"restructuredtext_lint",
"strictyaml",
]

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

[project.urls]
Homepage = "https://github.com/jnikula/hawkmoth"
Documentation = "https://jnikula.github.io/hawkmoth/stable/"

[tool.setuptools.dynamic]
version = {file = ["src/hawkmoth/VERSION"]}

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--strict-markers"
Expand Down
61 changes: 0 additions & 61 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,64 +1,3 @@
[metadata]
name = hawkmoth
version = file: src/hawkmoth/VERSION
author = Jani Nikula
author_email = [email protected]
description = Hawkmoth - Sphinx Autodoc for C
long_description = file: README.rst
long_description_content_type = text/x-rst
license = BSD-2-Clause
license_files = LICENSE
url = https://github.com/jnikula/hawkmoth
project_urls =
Documentation = https://jnikula.github.io/hawkmoth/stable/
keywords =
autodoc
c
documentation
python
sphinx
classifiers =
Development Status :: 4 - Beta
Framework :: Sphinx :: Extension
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3
Topic :: Documentation :: Sphinx
Topic :: Software Development :: Documentation

[options]
python_requires = ~=3.8
install_requires =
sphinx >= 3
# clang, depend on distro packaging
package_dir=
=src
packages =
hawkmoth
hawkmoth.ext
hawkmoth.ext.javadoc
hawkmoth.ext.napoleon
hawkmoth.ext.transformations
hawkmoth.util

[options.extras_require]
dev =
flake8
pytest
pytest-cov
pytest-xdist
restructuredtext_lint
strictyaml

[options.package_data]
hawkmoth =
VERSION

[options.entry_points]
console_scripts =
hawkmoth = hawkmoth.__main__:main

[flake8]
extend-ignore = E302,E305
max-line-length = 100

0 comments on commit fb4c946

Please sign in to comment.