Skip to content

Commit 82c51b6

Browse files
committed
Don't install repository tools/ directory as a package
Fixed issue in the 1.4.0 packaging where the repository's internal ``tools/`` directory was detected by setuptools package discovery and installed as a top-level ``tools`` package into site-packages, shadowing unrelated ``tools`` packages belonging to other applications. Package discovery is now limited to the ``mako`` package explicitly, matching what Alembic does, and the empty ``tools/__init__.py`` is removed so that ``tools`` is a namespace package as it is in SQLAlchemy and Alembic; ``noxfile.py`` continues to import from it, and ``tools/`` remains part of the sdist so that nox can run there. Fixes: #438 Change-Id: I15e4719e40b493ef7da94f3e94a2fbe315fc41dc
1 parent 4b1ecc2 commit 82c51b6

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎doc/build/unreleased/438.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. change::
2+
:tags: bug, installation
3+
:tickets: 438
4+
5+
Fixed issue in the 1.4.0 packaging where the repository's internal
6+
``tools/`` directory was detected by setuptools package discovery and
7+
installed as a top-level ``tools`` package into site-packages, shadowing
8+
unrelated ``tools`` packages belonging to other applications. Package
9+
discovery is now limited to the ``mako`` package explicitly.

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ zip-safe = false
101101
include-package-data = false
102102

103103
[tool.setuptools.packages.find]
104+
include = ["mako*"]
104105
exclude = [
105106
"test*",
106107
"examples*",

‎tools/__init__.py‎

Whitespace-only changes.

0 commit comments

Comments
 (0)