Skip to content

Commit 35dd5b4

Browse files
ashwin-antclaude
andauthored
fix: remove emojis from build_wheel.py for Windows compatibility (#342)
Windows console encoding (cp1252) doesn't support Unicode emoji characters, causing UnicodeEncodeError in CI. Replaced all emoji characters with plain text equivalents. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent ce99e9d commit 35dd5b4

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

scripts/build_wheel.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
def run_command(cmd: list[str], description: str) -> None:
3535
"""Run a command and handle errors."""
3636
print(f"\n{'=' * 60}")
37-
print(f"📦 {description}")
37+
print(f"{description}")
3838
print(f"{'=' * 60}")
3939
print(f"$ {' '.join(cmd)}")
4040
print()
@@ -49,7 +49,7 @@ def run_command(cmd: list[str], description: str) -> None:
4949
)
5050
print(result.stdout)
5151
except subprocess.CalledProcessError as e:
52-
print(f"Error: {description} failed", file=sys.stderr)
52+
print(f"Error: {description} failed", file=sys.stderr)
5353
print(e.stdout, file=sys.stderr)
5454
sys.exit(1)
5555

@@ -60,7 +60,7 @@ def update_version(version: str) -> None:
6060
update_script = script_dir / "update_version.py"
6161

6262
if not update_script.exists():
63-
print("⚠️ Warning: update_version.py not found, skipping version update")
63+
print("Warning: update_version.py not found, skipping version update")
6464
return
6565

6666
run_command(
@@ -105,10 +105,10 @@ def clean_dist() -> None:
105105
dist_dir = Path("dist")
106106
if dist_dir.exists():
107107
print(f"\n{'=' * 60}")
108-
print("🧹 Cleaning dist directory")
108+
print("Cleaning dist directory")
109109
print(f"{'=' * 60}")
110110
shutil.rmtree(dist_dir)
111-
print("Cleaned dist/")
111+
print("Cleaned dist/")
112112

113113

114114
def get_platform_tag() -> str:
@@ -152,7 +152,7 @@ def get_platform_tag() -> str:
152152
def retag_wheel(wheel_path: Path, platform_tag: str) -> Path:
153153
"""Retag a wheel with the correct platform tag using wheel package."""
154154
print(f"\n{'=' * 60}")
155-
print("🏷️ Retagging wheel as platform-specific")
155+
print("Retagging wheel as platform-specific")
156156
print(f"{'=' * 60}")
157157
print(f"Old: {wheel_path.name}")
158158

@@ -173,7 +173,7 @@ def retag_wheel(wheel_path: Path, platform_tag: str) -> Path:
173173
)
174174

175175
if result.returncode != 0:
176-
print(f"⚠️ Warning: Failed to retag wheel: {result.stderr}")
176+
print(f"Warning: Failed to retag wheel: {result.stderr}")
177177
return wheel_path
178178

179179
# Find the newly tagged wheel
@@ -184,15 +184,15 @@ def retag_wheel(wheel_path: Path, platform_tag: str) -> Path:
184184
if new_wheels:
185185
new_path = new_wheels[0]
186186
print(f"New: {new_path.name}")
187-
print("Wheel retagged successfully")
187+
print("Wheel retagged successfully")
188188

189189
# Remove the old wheel
190190
if wheel_path.exists() and wheel_path != new_path:
191191
wheel_path.unlink()
192192

193193
return new_path
194194
else:
195-
print("⚠️ Warning: Could not find retagged wheel")
195+
print("Warning: Could not find retagged wheel")
196196
return wheel_path
197197

198198

@@ -221,9 +221,9 @@ def build_wheel() -> None:
221221
if "-any.whl" in wheel.name:
222222
retag_wheel(wheel, platform_tag)
223223
else:
224-
print("⚠️ Warning: No wheel found to retag")
224+
print("Warning: No wheel found to retag")
225225
else:
226-
print("\nℹ️ No bundled CLI found - wheel will be platform-independent")
226+
print("\nNo bundled CLI found - wheel will be platform-independent")
227227

228228

229229
def build_sdist() -> None:
@@ -237,12 +237,12 @@ def build_sdist() -> None:
237237
def check_package() -> None:
238238
"""Check package with twine."""
239239
if not HAS_TWINE:
240-
print("\n⚠️ Warning: twine not installed, skipping package check")
240+
print("\nWarning: twine not installed, skipping package check")
241241
print("Install with: pip install twine")
242242
return
243243

244244
print(f"\n{'=' * 60}")
245-
print("📦 Checking package with twine")
245+
print("Checking package with twine")
246246
print(f"{'=' * 60}")
247247
print(f"$ {sys.executable} -m twine check dist/*")
248248
print()
@@ -258,13 +258,13 @@ def check_package() -> None:
258258
print(result.stdout)
259259

260260
if result.returncode != 0:
261-
print("\n⚠️ Warning: twine check reported issues")
261+
print("\nWarning: twine check reported issues")
262262
print("Note: 'License-File' warnings are false positives from twine 6.x")
263263
print("PyPI will accept these packages without issues")
264264
else:
265-
print("Package check passed")
265+
print("Package check passed")
266266
except Exception as e:
267-
print(f"⚠️ Warning: Failed to run twine check: {e}")
267+
print(f"Warning: Failed to run twine check: {e}")
268268

269269

270270
def clean_bundled_cli() -> None:
@@ -274,14 +274,14 @@ def clean_bundled_cli() -> None:
274274

275275
if cli_files:
276276
print(f"\n{'=' * 60}")
277-
print("🧹 Cleaning bundled CLI")
277+
print("Cleaning bundled CLI")
278278
print(f"{'=' * 60}")
279279
for cli_file in cli_files:
280280
if cli_file.name != ".gitignore":
281281
cli_file.unlink()
282-
print(f"Removed {cli_file}")
282+
print(f"Removed {cli_file}")
283283
else:
284-
print("\nℹ️ No bundled CLI to clean")
284+
print("\nNo bundled CLI to clean")
285285

286286

287287
def list_artifacts() -> None:
@@ -291,7 +291,7 @@ def list_artifacts() -> None:
291291
return
292292

293293
print(f"\n{'=' * 60}")
294-
print("📦 Built Artifacts")
294+
print("Built Artifacts")
295295
print(f"{'=' * 60}")
296296

297297
artifacts = sorted(dist_dir.iterdir())
@@ -345,7 +345,7 @@ def main() -> None:
345345
args = parser.parse_args()
346346

347347
print("\n" + "=" * 60)
348-
print("🚀 Claude Agent SDK - Wheel Builder")
348+
print("Claude Agent SDK - Wheel Builder")
349349
print("=" * 60)
350350

351351
# Clean dist if requested
@@ -360,7 +360,7 @@ def main() -> None:
360360
if not args.skip_download:
361361
download_cli(args.cli_version)
362362
else:
363-
print("\nℹ️ Skipping CLI download (using existing)")
363+
print("\nSkipping CLI download (using existing)")
364364

365365
# Build wheel
366366
build_wheel()
@@ -380,7 +380,7 @@ def main() -> None:
380380
list_artifacts()
381381

382382
print(f"\n{'=' * 60}")
383-
print("Build complete!")
383+
print("Build complete!")
384384
print(f"{'=' * 60}")
385385
print("\nNext steps:")
386386
print(" 1. Test the wheel: pip install dist/*.whl")

0 commit comments

Comments
 (0)