File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,46 +12,46 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15- - uses : mamba-org/setup-micromamba@v2
16- with :
17- init-shell : bash
18- cache-downloads : true
19-
20- - name : Checkout mapflpy
21- uses : actions/checkout@v4
22-
23- - name : Setup Python
24- uses : actions/setup-python@v5
25- with :
26- python-version : 3.13
27-
28- - name : Install build dependencies
29- run : |
30- python -m pip install --upgrade pip
31- pip install nox[pbs]
32-
33- - name : Set nox conda backend
34- run : echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
35-
36- - name : Build wheels
37- run : |
38- nox -s build
39-
40- - name : Repair wheels
41- run : |
42- nox -s repair
43-
44- - name : Build docs
45- run : |
46- nox -s docs
47-
48- - name : Upload docs artifact
49- if : always()
50- uses : actions/upload-artifact@v4
51- with :
52- name : docs
53- path : .nox/_artifacts/docs/html*/
54- retention-days : 7
15+ # - uses: mamba-org/setup-micromamba@v2
16+ # with:
17+ # init-shell: bash
18+ # cache-downloads: true
19+ #
20+ # - name: Checkout mapflpy
21+ # uses: actions/checkout@v4
22+ #
23+ # - name: Setup Python
24+ # uses: actions/setup-python@v5
25+ # with:
26+ # python-version: 3.13
27+ #
28+ # - name: Install build dependencies
29+ # run: |
30+ # python -m pip install --upgrade pip
31+ # pip install nox[pbs]
32+ #
33+ # - name: Set nox conda backend
34+ # run: echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
35+ #
36+ # - name: Build wheels
37+ # run: |
38+ # nox -s build
39+ #
40+ # - name: Repair wheels
41+ # run: |
42+ # nox -s repair
43+ #
44+ # - name: Build docs
45+ # run: |
46+ # nox -s docs
47+ #
48+ # - name: Upload docs artifact
49+ # if: always()
50+ # uses: actions/upload-artifact@v4
51+ # with:
52+ # name: docs
53+ # path: .nox/_artifacts/docs/html*/
54+ # retention-days: 7
5555
5656 - name : Prepare SSH
5757 env :
Original file line number Diff line number Diff line change 5555 matrix :
5656 os :
5757 - ubuntu-24.04
58- # - ubuntu-22.04-arm
59- # - macos-15-intel
60- # - macos-15
58+ - ubuntu-22.04-arm
59+ - macos-15-intel
60+ - macos-15
6161 steps :
6262 - uses : mamba-org/setup-micromamba@v2
6363 with :
@@ -117,9 +117,9 @@ jobs:
117117 matrix :
118118 os :
119119 - ubuntu-24.04
120- # - ubuntu-22.04-arm
121- # - macos-15-intel
122- # - macos-15
120+ - ubuntu-22.04-arm
121+ - macos-15-intel
122+ - macos-15
123123 steps :
124124 - uses : mamba-org/setup-micromamba@v2
125125 with :
Original file line number Diff line number Diff line change 11
22project (
33 ' mapflpy' ,
4- [ ' c' , ' fortran' ] ,
5- version : ' 1.1.2.pre2 ' ,
4+ ' c' , ' cpp ' , ' fortran' ,
5+ version : run_command ([ ' tools/pyproject_version.py ' ], check : true ).stdout().strip() ,
66 license : ' Apache-2.0' ,
77 meson_version : ' >=1.1.0' ,
8- default_options : [' warning_level=1' , ' buildtype=release' ],
8+ default_options : [
9+ ' warning_level=1' ,
10+ ' buildtype=release'
11+ ],
912)
1013
1114# ---- Compilers / platform niceties
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ requires = [
1616# ----------------
1717[project ]
1818name = " mapflpy"
19- dynamic = [ " version " ]
19+ version = " 1.1.2 "
2020description = " Python extension for tracing field lines using the Fortran tracer from MapFL"
2121authors = [
2222 {name = " Predictive Science Inc." , email = " webmaster@predsci.com" },
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ import os
3+ import textwrap
4+ from pathlib import Path
5+
6+
7+ def init_version ():
8+ # Load TOML (tomllib on 3.11+, fallback to tomli)
9+ try :
10+ import tomllib # Python 3.11+
11+ except ModuleNotFoundError : # pragma: no cover
12+ import tomli as tomllib # pip install tomli
13+
14+ pyproject = Path (__file__ ).parents [1 ].resolve () / 'pyproject.toml'
15+ with open (pyproject , 'rb' ) as f :
16+ data = tomllib .load (f )
17+
18+ version = data .get ("project" , {}).get ("version" , '0.0.0' )
19+ return version .replace ('"' , '' ).replace ("'" , '' )
20+
21+ if __name__ == "__main__" :
22+ version = init_version ()
23+ print (version )
You can’t perform that action at this time.
0 commit comments