Skip to content

Commit 9add837

Browse files
authored
Merge pull request #1162 from ToFuProject/Issue1161_version
Issue1161 version
2 parents 0c7810f + e6854fe commit 9add837

File tree

6 files changed

+9
-43
lines changed

6 files changed

+9
-43
lines changed

.github/workflows/publish-pypi-bdist-linux.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ jobs:
4343
# Build dist
4444
- name: Build the project
4545
run: |
46-
rm dist/*
47-
uv build
48-
rm dist/*.tar.gz
46+
uv build --wheel
4947
5048
- name: Publish bdist to PyPI
5149
env:

.github/workflows/publish-pypi-sdist.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ jobs:
3333
# Build dist
3434
- name: Build the project
3535
run: |
36-
uv build
37-
rm dist/*whl
36+
uv build --sdist
3837
3938
- name: Publish sdist to PyPI
4039
env:

meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
# ###################################
55

66

7+
# version: run_command(['git', 'describe'], capture:true, check:false).stdout().strip().split('-')[0],
8+
# https://mesonbuild.com/Builtin-options.html
79
project(
810
'tofu',
911
'c', 'cpp', 'cython',
1012
license: 'MIT',
1113
meson_version: '>=1.8.3',
12-
version: run_command(['git', 'describe'], capture:true, check:false).stdout().strip().split('-')[0],
13-
# https://mesonbuild.com/Builtin-options.html
14+
version: run_command(['python', 'tofu/version.py'], check:true).stdout().strip(),
1415
default_options: [
1516
'buildtype=release',
1617
'c_std=c11',

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dist = ['--include-subprojects']
3434
name = "tofu"
3535
readme = "README.md"
3636
license = "MIT"
37-
version = "1.8.17"
37+
dynamic = ["version"]
3838
description = "TOmography for FUsion toolkit"
3939
authors = [
4040
{name = "Didier VEZINET", email = "didier.vezinet@gmail.com"},

tofu/_version.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

tofu/version.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# Do not edit, pipeline versioning governed by git tags!
21
__version__ = '1.8.18'
2+
3+
if __name__ == "__main__":
4+
print(__version__)

0 commit comments

Comments
 (0)