File tree Expand file tree Collapse file tree 8 files changed +742
-32
lines changed
Expand file tree Collapse file tree 8 files changed +742
-32
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 fetch-depth : 0
2929
30+ - uses : actions/setup-python@v5
31+ with :
32+ python-version : " 3.x"
33+
34+ - name : Read idc-index-data version from pyproject.toml
35+ run : |
36+ python - <<'PY' > /tmp/idc_ver.env
37+ import tomllib, re
38+ with open('pyproject.toml','rb') as f:
39+ data = tomllib.load(f)
40+ ver = None
41+ for d in data['project']['dependencies']:
42+ m = re.match(r'idc-index-data==(.+)', d)
43+ if m:
44+ ver = m.group(1)
45+ break
46+ assert ver, 'idc-index-data version not found in pyproject.toml'
47+ print(f'IDC_INDEX_DATA_VERSION={ver}')
48+ PY
49+ cat /tmp/idc_ver.env >> $GITHUB_ENV
50+
51+ - name : Preinstall idc-index-data for cache generation
52+ env :
53+ IDC_INDEX_DATA_VERSION : ${{ env.IDC_INDEX_DATA_VERSION }}
54+ run : |
55+ python -m pip install --upgrade pip
56+ python -m pip install "idc-index-data==${IDC_INDEX_DATA_VERSION}"
57+
58+ - name : Generate bundled indices cache
59+ run : |
60+ python scripts/generate_indices_cache.py
61+
3062 - uses : hynek/build-and-inspect-python-package@v2
3163
3264 publish :
Original file line number Diff line number Diff line change 5353 python-version : ${{ matrix.python-version }}
5454 allow-prereleases : true
5555
56+ - name : Read idc-index-data version from pyproject.toml
57+ run : |
58+ python - <<'PY' > /tmp/idc_ver.env
59+ import tomllib, re
60+ with open('pyproject.toml','rb') as f:
61+ data = tomllib.load(f)
62+ ver = None
63+ for d in data['project']['dependencies']:
64+ m = re.match(r'idc-index-data==(.+)', d)
65+ if m:
66+ ver = m.group(1)
67+ break
68+ assert ver, 'idc-index-data version not found in pyproject.toml'
69+ print(f'IDC_INDEX_DATA_VERSION={ver}')
70+ PY
71+ cat /tmp/idc_ver.env >> $GITHUB_ENV
72+
73+ - name : Preinstall idc-index-data for cache generation
74+ env :
75+ IDC_INDEX_DATA_VERSION : ${{ env.IDC_INDEX_DATA_VERSION }}
76+ run : |
77+ python -m pip install --upgrade pip
78+ python -m pip install "idc-index-data==${IDC_INDEX_DATA_VERSION}"
79+
80+ - name : Generate bundled indices cache
81+ run : |
82+ python scripts/generate_indices_cache.py
83+
5684 - name : Install package
5785 run : python -m pip install .[test]
5886
You can’t perform that action at this time.
0 commit comments