Skip to content

Commit

Permalink
Fix breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Nov 10, 2024
1 parent 9660406 commit 4c89f78
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
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 4c89f78

Please sign in to comment.