Skip to content

Commit

Permalink
Update pyproject.toml to include pydantic shim in wheel distribution …
Browse files Browse the repository at this point in the history
…building

Previously we weren't specifying what was to be included in the wheel build,
thus the wheel distribution was going through the default paths, which were
as documented [here](https://hatch.pypa.io/1.9/plugins/builder/wheel/#default-file-selection)

* <NAME>/__init__.py
* src/<NAME>/__init__.py
* <NAME>.py
* <NAMESPACE>/<NAME>/__init__.py

This meant that our pydantic shim was being excluded. This commit alters
the pyproject.toml to now begin specifying the packages to be included
in the wheel distribution, and notably adds our pydantic shim to it.
  • Loading branch information
QMalcolm committed Jan 4, 2024
1 parent 5d3d4d0 commit 3797c55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240104-120817.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Ensure the pydantic shim is included in the wheel distribution
time: 2024-01-04T12:08:17.850576-08:00
custom:
Author: QMalcolm
Issue: "241"
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ exclude = [
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["dbt_semantic_interfaces", "dsi_pydantic_shim.py"]

[tool.hatch.envs.dev-env.scripts]
all = ["pre-commit run --all-files"]

Expand Down

0 comments on commit 3797c55

Please sign in to comment.