Skip to content

Commit 1d8cd29

Browse files
authored
Fix breaking changes (#1795)
1 parent 9660406 commit 1d8cd29

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

.github/workflows/build-hatch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
uses: astral-sh/setup-uv@v3
4949

5050
- name: Install tools
51-
run: uv pip install --system build hatch
51+
run: |-
52+
uv pip install --system build
53+
uv pip install --system .
54+
uv pip install --system ./backend
5255
5356
# Windows installers don't accept non-integer versions so we ubiquitously
5457
# perform the following transformation: X.Y.Z.devN -> X.Y.Z.N

backend/src/hatchling/dep/__init__.py

Whitespace-only changes.

backend/src/hatchling/dep/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from hatchling.cli.dep.core import dependencies_in_sync # noqa: F401

backend/src/hatchling/metadata/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,9 @@ def license_files(self) -> list[str]:
742742
'listed in field `project.dynamic`'
743743
)
744744
raise ValueError(message)
745+
746+
if isinstance(globs, dict):
747+
globs = globs.get('globs', globs.get('paths', []))
745748
else:
746749
globs = ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']
747750

docs/config/metadata.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,11 @@ For more information, see [PEP 639][].
113113

114114
=== "Files"
115115

116-
=== "Paths"
117-
118-
```toml
119-
[project]
120-
...
121-
license-files = { paths = ["LICENSE.txt"] }
122-
```
123-
124-
=== "Globs"
125-
126-
```toml
127-
[project]
128-
...
129-
license-files = { globs = ["LICENSES/*"] }
130-
```
116+
```toml
117+
[project]
118+
...
119+
license-files = ["LICENSES/*"]
120+
```
131121

132122
## Ownership
133123

docs/history/hatchling.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
## Unreleased
1010

11+
***Fixed:***
12+
13+
- Add backward compatibility for the old `license-files` metadata field
14+
- Support an old import path that is still used by some consumers like Hatch
15+
1116
## [1.26.0](https://github.com/pypa/hatch/releases/tag/hatchling-v1.26.0) - 2024-11-10 ## {: #hatchling-v1.26.0 }
1217

18+
***Changed:***
19+
20+
- The `license-files` metadata field has been updated to the latest spec and is now just an array of glob patterns
21+
1322
***Added:***
1423

1524
- Support version 2.4 of core metadata for the `wheel` and `sdist` targets

0 commit comments

Comments
 (0)