-
in The context of the sphinxcontrib organisation the package are supposed to all live in a sphinxcontrib namespace package like "sphinxcontrib.icon" or "sphinxcontrib.badge". The file have the following structure:
In a setuptools based pyproject.toml file I would do the following: # pyproject.toml
[build-system]
requires = ["setuptools>=61.2", "wheel", "pynpm>=0.2.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = false
packages = ["sphinxcontrib.icon"] Now I would like to migrate to hatchings but I don't manage to reprduce this behaviour. In my parameters I do: # pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["sphinxcontrib/skeleton"] In the "site-packages" folder my lib is not under in "sphincontrib/icon" as I would expect. How should I adapt my code to make it work ? I have a example sitting here: https://github.com/sphinx-contrib/sphinxcontrib-skeleton/tree/test |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey there! The [tool.hatch.build.targets.wheel]
only-include = ["sphinxcontrib"] Note that you could also use the regular |
Beta Was this translation helpful? Give feedback.
Hey there! The
packages
option is for the case where your code lives under a directory likesrc/
and will collapse until the last path component. So if your namespace package lived under such a directory then you could set that tosrc/sphinxcontrib
but since it does not you will probably want to do:Note that you could also use the regular
include
option there but that would still have to recurse other directories, so just a performance hack.