Skip to content

Commit

Permalink
use setuptools_scm
Browse files Browse the repository at this point in the history
  • Loading branch information
DennyDai committed Oct 22, 2024
1 parent c13b635 commit 6ec111e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/decompiler-plugins-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
pip install
build
--user
- name: Update version in pyproject.toml
working-directory: ${{ github.workspace }}/decompiler-plugins
run: |
version=$(echo "${{ github.ref_name }}" | sed 's:.*/::')
sed -i "s/^version = \".*\"/version = \"$version\"/" pyproject.toml
- name: Build a binary wheel and a source tarball
working-directory: ${{ github.workspace }}/decompiler-plugins
run: >-
Expand Down
8 changes: 6 additions & 2 deletions decompiler-plugins/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "patcherex2-decompiler-plugins"
version = "0.0.0"
dynamic = ["version"]
requires-python = ">=3.8"
readme = "README.md"
dependencies = [
Expand All @@ -26,3 +26,7 @@ include = ["patcherex2.decompiler_plugins"]

[tool.ruff.lint]
extend-select = ["I", "N", "UP", "B"]

[tool.setuptools_scm]
root = ".."
tag_regex = '^decompiler-plugins/(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from importlib import metadata

__version__ = metadata.version("patcherex2-decompiler-plugins")


def create_plugin(*args, **kwargs):
"""
This is the entry point that all decompilers will call in various ways. To remain agnostic,
Expand Down

0 comments on commit 6ec111e

Please sign in to comment.