Skip to content

Conversation

@richard-gyiko
Copy link
Owner

No description provided.

@richard-gyiko richard-gyiko requested a review from Copilot April 25, 2025 06:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the build process to support per platform wheels by removing the binary extraction logic from the engine and instead relying on pre-built .NET binaries. Key changes include:

  • Removal of the old extraction logic and refactoring of XmlPowerToolsEngine in favor of using a BIN_DIR.
  • Introduction of a new build hook (build_hooks.py) to compile and include .NET binaries in the wheel.
  • Updates to pyproject.toml and the GitHub workflow configuration to support cibuildwheel builds.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/python_redlines/engines.py Refactored engine initialization and binary execution logic
src/python_redlines/init.py Added platform-detection logic and BIN_DIR definition for binary management
pyproject.toml Updated build configuration to use new build hooks and cibuildwheel settings
hatch_run_build_hook.py Removed legacy build hook
build_hooks.py Added new hook to compile and integrate .NET binaries into the wheel
build_differ.py Removed legacy build script
.github/workflows/build_wheels.yml Added CI/CD workflow for building and uploading platform-specific wheels
Files not reviewed (1)
  • .github/workflows/python-publish.yml: Language not supported
Comments suppressed due to low confidence (2)

build_hooks.py:56

  • [nitpick] Consider using pathlib (e.g., Path(out_dir).parent.mkdir(parents=True, exist_ok=True)) to create directories for consistency with the rest of the code.
os.makedirs(os.path.dirname(out_dir), exist_ok=True) 

build_hooks.py:84

  • [nitpick] For improved cross-platform reliability, consider constructing destination paths with pathlib rather than using f-string concatenation.
dest_path = f"src/python_redlines/{bin_dir_rel}/{file.name}" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants