Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Get version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: bash

- name: Update version in __init__.py
run: |
sed '/__version__ =/d' python/src/piquant/__init__.py > python/src/piquant/__init__.py.tmp
mv python/src/piquant/__init__.py.tmp python/src/piquant/__init__.py
echo "__version__ = \"$VERSION\"" >> python/src/piquant/__init__.py
shell: bash

- name: Install build tools
run: |
Expand Down
5 changes: 4 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pypiquant"
version = "0.1.0"
dynamic = ["version"]
authors = [
{name = "Mario Sieg", email = "[email protected]"},
]
Expand All @@ -24,6 +24,9 @@ dev = ["pytest","torch","numpy","pre-commit","ruff", "matplotlib", "twine"]
line-length = 120
target-version = "py38"

[tool.setuptools.dynamic]
version = {attr = "piquant.__version__"}

[tool.ruff.lint]
ignore = ["F403"]
select = ["ANN"]
Expand Down