Skip to content

Commit

Permalink
Fix breaking changes (#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Nov 10, 2024
1 parent 9660406 commit 1d8cd29
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ jobs:
uses: astral-sh/setup-uv@v3

- name: Install tools
run: uv pip install --system build hatch
run: |-
uv pip install --system build
uv pip install --system .
uv pip install --system ./backend
# Windows installers don't accept non-integer versions so we ubiquitously
# perform the following transformation: X.Y.Z.devN -> X.Y.Z.N
Expand Down
Empty file.
1 change: 1 addition & 0 deletions backend/src/hatchling/dep/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from hatchling.cli.dep.core import dependencies_in_sync # noqa: F401
3 changes: 3 additions & 0 deletions backend/src/hatchling/metadata/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ def license_files(self) -> list[str]:
'listed in field `project.dynamic`'
)
raise ValueError(message)

if isinstance(globs, dict):
globs = globs.get('globs', globs.get('paths', []))
else:
globs = ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']

Expand Down
20 changes: 5 additions & 15 deletions docs/config/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,11 @@ For more information, see [PEP 639][].

=== "Files"

=== "Paths"

```toml
[project]
...
license-files = { paths = ["LICENSE.txt"] }
```

=== "Globs"

```toml
[project]
...
license-files = { globs = ["LICENSES/*"] }
```
```toml
[project]
...
license-files = ["LICENSES/*"]
```

## Ownership

Expand Down
9 changes: 9 additions & 0 deletions docs/history/hatchling.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

***Fixed:***

- Add backward compatibility for the old `license-files` metadata field
- Support an old import path that is still used by some consumers like Hatch

## [1.26.0](https://github.com/pypa/hatch/releases/tag/hatchling-v1.26.0) - 2024-11-10 ## {: #hatchling-v1.26.0 }

***Changed:***

- The `license-files` metadata field has been updated to the latest spec and is now just an array of glob patterns

***Added:***

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

0 comments on commit 1d8cd29

Please sign in to comment.