Skip to content

Commit 65e5bc1

Browse files
committed
fix: packaging issue for generated /sync files
UV respects `.gitgnore` by default and excludes generated `/sync` files from built packages. In this PR we explicitly specify files that should be packed and ignore vcs
1 parent 0f640ad commit 65e5bc1

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
if unzip -l "$WHEEL" | grep -q "ably/sync/"; then
5353
echo "✅ Found ably/sync/ in wheel"
5454
else
55+
unzip -l "$WHEEL"
5556
echo "❌ ably/sync/ not found in wheel"
5657
exit 1
5758
fi
@@ -62,6 +63,7 @@ jobs:
6263
if tar -tzf "$TARBALL" | grep -q "ably/sync/"; then
6364
echo "✅ Found ably/sync/ in tarball"
6465
else
66+
tar -tzf "$TARBALL"
6567
echo "❌ ably/sync/ not found in tarball"
6668
exit 1
6769
fi

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ ably/types/options.py.orig
5555
test/ably/restsetup.py.orig
5656

5757
.idea/**/*
58-
**/ably/sync/***
58+
ably/sync/**
59+
test/ably/sync/**

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,25 @@ Repository = "https://github.com/ably/ably-python"
6868
requires = ["hatchling"]
6969
build-backend = "hatchling.build"
7070

71+
[tool.hatch.build.targets.sdist]
72+
ignore-vcs = true
73+
include = [
74+
"/ably",
75+
"/COPYRIGHT",
76+
"/README.md",
77+
"/LICENSE",
78+
"/LONG_DESCRIPTION.rst",
79+
"/images",
80+
"/setup.cfg",
81+
"/pyproject.toml"
82+
]
83+
exclude = [
84+
"**/*.pyc",
85+
"**/__pycache__"
86+
]
87+
7188
[tool.hatch.build.targets.wheel]
89+
ignore-vcs = true
7290
packages = ["ably"]
7391

7492
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)