Skip to content

fix(build): add versioningit to build requirements - #19

Merged
jiahy0825 merged 2 commits into
SandAI-org:mainfrom
ooooo-create:fix/add-versioningit-build-requirement
Apr 13, 2026
Merged

jiahy0825 merged 2 commits into
SandAI-org:mainfrom
ooooo-create:fix/add-versioningit-build-requirement

Conversation

@ooooo-create

@ooooo-create ooooo-create commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

🗂️ PR Category

  • ✨ New Feature
  • 🚀 Optimization (performance, memory, etc.)
  • 💥 Breaking Change
  • 🐛 Bug Fix
  • 🛠️ Development / Refactoring
  • 📚 Documentation
  • 🧹 Chore (Dependencies, CI/CD, Configuration, etc.)
  • 🧪 Testing

📝 Description

This fix ensures that installing the package via pip install . correctly generates magi_compiler/_version.py with the resolved version, and exposes that version through magi_compiler.__version__ after import.

image

Copilot AI review requested due to automatic review settings April 10, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown

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 ensures the package version is resolved during builds and is accessible at runtime via magi_compiler.__version__, aligning the packaging workflow with the existing versioningit configuration in pyproject.toml.

Changes:

  • Add versioningit to build-system.requires so PEP 517 builds can resolve the dynamic version and write magi_compiler/_version.py.
  • Expose magi_compiler.__version__ by importing from the generated _version module with a safe fallback when it’s absent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Adds versioningit to build requirements to support dynamic version resolution during builds.
magi_compiler/__init__.py Exposes __version__ from the generated _version.py (with fallback) and exports it via __all__.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread magi_compiler/__init__.py Resolved

@wtr0504 wtr0504 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jiahy0825
jiahy0825 merged commit 720aa55 into SandAI-org:main Apr 13, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants