File tree 4 files changed +16
-5
lines changed
4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish to PyPi
2
2
3
3
on :
4
- release :
5
- types : [published]
4
+ push :
5
+ tags :
6
+ - ' *'
6
7
workflow_dispatch :
7
8
8
9
jobs :
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
7
7
set (CMAKE_CUDA_ARCHITECTURES 75)
8
8
endif ()
9
9
10
- project (nuTens)
10
+ # set the project name and version
11
+ project (nuTens VERSION 0.1.0)
11
12
12
13
# Changes default install path to be a subdirectory of the build dir.
13
14
# Can set build dir at configure time with -DCMAKE_INSTALL_PREFIX=/install/path
Original file line number Diff line number Diff line change 1
1
2
2
[project ]
3
3
name = " nuTens"
4
- version = " 0.0.3"
5
4
description =" Library to calculate neutrino oscillation probabilities using tensors"
6
5
readme = " README.md"
7
6
authors = [
@@ -24,6 +23,7 @@ classifiers = [
24
23
dependencies = [
25
24
" torch"
26
25
]
26
+ dynamic = [" version" ]
27
27
28
28
[project .urls ]
29
29
Repository = " https://github.com/ewanwm/nuTens"
@@ -39,3 +39,12 @@ build-frontend = "build[uv]"
39
39
40
40
[tool .scikit-build .cmake ]
41
41
args = [" -DNT_ENABLE_PYTHON=ON" ]
42
+
43
+ [tool .scikit-build .metadata .version ]
44
+ provider = " scikit_build_core.metadata.setuptools_scm"
45
+
46
+ [tool .scikit-build .sdist ]
47
+ include = [" src/package/_version.py" ]
48
+
49
+ [tool .setuptools_scm ] # Section required
50
+ write_to = " _version.py"
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ endif()
10
10
target_link_libraries ( _pyNuTens PUBLIC nuTens )
11
11
12
12
# This is passing in the version as a define just as an example
13
- target_compile_definitions ( _pyNuTens PRIVATE VERSION_INFO=${PROJECT_VERSION } )
13
+ target_compile_definitions ( _pyNuTens PRIVATE VERSION_INFO=${CMAKE_PROJECT_VERSION } )
14
14
15
15
install ( TARGETS _pyNuTens DESTINATION nuTens/ )
You can’t perform that action at this time.
0 commit comments