[PR #245] [CLOSED] build: add pyproject.toml for PEP 518 compliance and automatic versioning #309

Closed
opened 2026-10-26 21:16:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/245
Author: @yurekami
Created: 12/25/2025
Status: ❌ Closed

Base: main ← Head: feat/add-pyproject-toml


📝 Commits (1)

  • 8bea3df build: add setuptools-scm for automatic version management

📊 Changes

4 files changed (+116 additions, -4 deletions)

View changed files

📝 .gitignore (+4 -1)
📝 deep_gemm/__init__.py (+10 -1)
➕ pyproject.toml (+60 -0)
📝 setup.py (+42 -2)

📄 Description

Summary

This PR adds a comprehensive pyproject.toml that addresses two issues:

Issue #207 - Missing build requirements for PEP 518

  • Declares build system requirements enabling proper PEP 518 support
  • Tools like pip and python -m build can now automatically install build dependencies

Issue #228 - Version mismatch for post-releases

  • Uses setuptools-scm for automatic version detection from git tags
  • Versions are derived directly from git tags (e.g., v2.1.1.post3 → 2.1.1.post3)
  • Eliminates manual __version__ maintenance in __init__.py

Changes

Build requirements:

  • setuptools>=61.0: modern build backend
  • setuptools-scm>=8.0: automatic versioning from git tags
  • wheel: for bdist_wheel command
  • torch>=2.1.0: CUDA extension building
  • packaging: version parsing utilities

setuptools-scm configuration:

  • Uses post-release versioning scheme
  • Writes version to deep_gemm/_version.py for runtime access
  • Falls back to 0.0.0 when not in a git repo (e.g., source tarball)

Project metadata:

  • Proper package classifiers
  • Python version requirements (>=3.8)
  • Project URLs for homepage, repository, issues

Test plan

  • Verify python -m build works without pre-installed dependencies
  • Verify version is correctly derived from git tags
  • Verify post-release tags produce correct version numbers

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/245 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/add-pyproject-toml` --- ### 📝 Commits (1) - [`8bea3df`](https://github.com/deepseek-ai/DeepGEMM/commit/8bea3df7a4e6be94b07137712d3056a69f10bc34) build: add setuptools-scm for automatic version management ### 📊 Changes **4 files changed** (+116 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+4 -1) 📝 `deep_gemm/__init__.py` (+10 -1) ➕ `pyproject.toml` (+60 -0) 📝 `setup.py` (+42 -2) </details> ### 📄 Description ## Summary This PR adds a comprehensive `pyproject.toml` that addresses two issues: ### Issue #207 - Missing build requirements for PEP 518 - Declares build system requirements enabling proper PEP 518 support - Tools like `pip` and `python -m build` can now automatically install build dependencies ### Issue #228 - Version mismatch for post-releases - Uses `setuptools-scm` for automatic version detection from git tags - Versions are derived directly from git tags (e.g., `v2.1.1.post3` → `2.1.1.post3`) - Eliminates manual `__version__` maintenance in `__init__.py` ## Changes **Build requirements:** - `setuptools>=61.0`: modern build backend - `setuptools-scm>=8.0`: automatic versioning from git tags - `wheel`: for bdist_wheel command - `torch>=2.1.0`: CUDA extension building - `packaging`: version parsing utilities **setuptools-scm configuration:** - Uses post-release versioning scheme - Writes version to `deep_gemm/_version.py` for runtime access - Falls back to `0.0.0` when not in a git repo (e.g., source tarball) **Project metadata:** - Proper package classifiers - Python version requirements (>=3.8) - Project URLs for homepage, repository, issues ## Test plan - [ ] Verify `python -m build` works without pre-installed dependencies - [ ] Verify version is correctly derived from git tags - [ ] Verify post-release tags produce correct version numbers 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:16:07 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#309
No description provided.