Skip to content

Commit 65ba73a

Browse files
committed
fix: set metadata-version to 2.1 and remove LICENSE before build
- Set metadata-version to 2.1 to avoid license-file field (2.4+ feature) - Remove LICENSE file before build to prevent auto-detection - Simplify build process
1 parent 0f1f402 commit 65ba73a

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

.github/workflows/publish-pyobsql-pypi.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,9 @@ jobs:
7575
- name: Build package
7676
working-directory: pyobsql-oceanbase-plugin
7777
run: |
78-
# Temporarily move LICENSE file to prevent hatchling from adding license-file field
79-
if [ -f LICENSE ]; then
80-
mv LICENSE LICENSE.bak
81-
fi
78+
# Remove LICENSE file to prevent hatchling from auto-detecting it
79+
rm -f LICENSE LICENSE.txt
8280
python -m build
83-
# Restore LICENSE file
84-
if [ -f LICENSE.bak ]; then
85-
mv LICENSE.bak LICENSE
86-
fi
8781
8882
- name: Check package
8983
working-directory: pyobsql-oceanbase-plugin

pyobsql-oceanbase-plugin/pyproject.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,9 @@ license = {text = "Apache-2.0"}
4545

4646
[tool.hatchling.build]
4747
packages = ["pyobsql"]
48-
exclude = [
49-
"/LICENSE",
50-
"/LICENSE.txt",
51-
]
5248

5349
[tool.hatch.build.targets.wheel]
54-
exclude = [
55-
"/LICENSE",
56-
"/LICENSE.txt",
57-
]
50+
metadata-version = "2.1"
5851

5952

6053

0 commit comments

Comments
 (0)