nucleic / kiwi

Efficient C++ implementation of the Cassowary constraint solving algorithm
https://kiwisolver.readthedocs.io/en/latest/
Other
692 stars 88 forks source link

`top_level.txt` include a non existing module `src` #169

Closed ProgramRipper closed 1 year ago

ProgramRipper commented 1 year ago

Current content of top_level.txt in dist metadata is:

kiwisolver
src

This causes importlib.metadata.packages_distributions() to return:

{
  'kiwisolver': ['kiwisolver'],
  'src': ['kiwisolver'],
  ...
}

This is confusing, especially in the src-layout project, whose top-level package happens to be src.

Please consider this change, though this will add tests directory into source distribution (hope this is not important):

diff --git a/pyproject.toml b/pyproject.toml
index 26dee95..3440a23 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -48,8 +48,7 @@ include-package-data = false
 package-data = {kiwisolver = ["py.typed", "*.pyi"]}

 [tool.setuptools.packages.find]
-where = ["py"]
-exclude = ["tests"]
+include = ["py/kiwisolver"]

 [tool.setuptools_scm]
 write_to = "py/src/version.h"