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 1d70c02 commit 589c5ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
tags:
- '*'
release:
types: [ created ]

jobs:
Publish:
Expand All @@ -22,11 +21,6 @@ jobs:
pip install
build
--user
- name: Update version in pyproject.toml
run: >-
sed -i
"s/^version = \".*\"/version = \"${{ github.ref_name }}\"/"
pyproject.toml
- name: Build a binary wheel and a source tarball
run: >-
python -m
Expand Down
7 changes: 5 additions & 2 deletions 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"
version = "0.0.0"
dynamic = ["version"]
requires-python = ">=3.8"
readme = "README.md"
dependencies = [
Expand Down Expand Up @@ -34,3 +34,6 @@ exclude = ["examples"]

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

[tool.setuptools_scm]
# empty
3 changes: 3 additions & 0 deletions src/patcherex2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ruff: noqa
from .patcherex import Patcherex
from .patches import *
from importlib import metadata

__version__ = metadata.version("patcherex2")

__all__ = ["Patcherex"] + patches.__all__

0 comments on commit 589c5ea

Please sign in to comment.