-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging: switch to hatch and pyproject.toml
Start using hatch [1] for the project management. Run 'hatch new --init' and do some manual changes on top: - Use SPDX compatible license identifier for BSD-2-Clause - Fix version path and pattern - Include setup.py in packaging - Exclude Makefiles from packaging - Remove setup.cfg parts Due to setuptools defaults [2], we've included some files from test/ as well as the generated hawkmoth.egg-info in the source tarball. Drop them. [1] https://hatch.pypa.io/latest/ [2] https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
- Loading branch information
Showing
2 changed files
with
68 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,73 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "hawkmoth" | ||
dynamic = ["version"] | ||
description = "Hawkmoth - Sphinx Autodoc for C" | ||
readme = "README.rst" | ||
license = "BSD-2-Clause" | ||
requires-python = "~=3.8" | ||
authors = [ | ||
{ name = "Jani Nikula", email = "[email protected]" }, | ||
] | ||
build-backend = "setuptools.build_meta" | ||
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] | ||
Documentation = "https://jnikula.github.io/hawkmoth/stable/" | ||
Homepage = "https://github.com/jnikula/hawkmoth" | ||
|
||
[tool.hatch.version] | ||
path = "src/hawkmoth/VERSION" | ||
pattern = "(?P<version>[a-zA-Z0-9._-]*)" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"/setup.py", | ||
"/src", | ||
] | ||
exclude = [ | ||
"**/Makefile*", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
exclude = [ | ||
"**/Makefile*", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "--strict-markers" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 2-Clause BSD | ||
license_files = LICENSE | ||
url = https://github.com/jnikula/hawkmoth | ||
project_urls = | ||
Documentation = https://jnikula.github.io/hawkmoth/stable/ | ||
keywords = | ||
python | ||
sphinx | ||
autodoc | ||
documentation | ||
c | ||
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 |