File tree Expand file tree Collapse file tree 5 files changed +38
-27
lines changed
Expand file tree Collapse file tree 5 files changed +38
-27
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ echo %CONDA_PREFIX%
2727python -c " import os; print('\n'.join(os.environ['PATH'].split(';')))"
2828echo ----------
2929
30+ echo ========================================
31+ echo Fix up the sha in python/ray/_version.py
32+ echo ========================================
33+ python3 %RECIPE_DIR% /fixup_sha.py python/ray/_version.py %RAY_VER%
34+
35+
3036echo ==========================================================
3137echo calling pip to install
3238echo ==========================================================
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ echo '---------------- .bazelrc --------------------------'
4949cat .bazelrc
5050echo ' ----------------------------------------------------'
5151
52+ echo ========================================
53+ echo Fix up the sha in python/ray/_version.py
54+ echo ========================================
55+ python3 ${RECIPE_DIR} /fixup_sha.py python/ray/_version.py ${RAY_VER}
56+
5257cd python/
5358export SKIP_THIRDPARTY_INSTALL_CONDA_FORGE=1
5459
Original file line number Diff line number Diff line change 1+ # Call like python3 __file__ python/ray/_version.py 2.49.2
2+
3+ import json ;
4+ import os
5+ import sys
6+ from urllib .request import urlopen ;
7+
8+ versionpy = sys .argv [1 ]
9+ ver = sys .argv [2 ]
10+
11+ assert os .path .exists (versionpy )
12+
13+ content = urlopen (f'https://api.github.com/repos/ray-project/ray/git/ref/tags/ray-{ ver } ' ).read ()
14+ sha = json .loads (content )['object' ]['sha' ]
15+ with open (versionpy , 'r' ) as fid :
16+ txt = fid .read ()
17+ txt = txt .replace ("{{RAY_COMMIT_SHA}}" , sha )
18+ assert f'version = "{ ver } "' in txt
19+ assert f'commit = "{ sha } "' in txt
20+ with open (versionpy , 'w' ) as fid :
21+ fid .write (txt )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ source:
1515 - patches/0001-Disable-making-entry-scripts.patch
1616 - patches/0002-Ignore-warnings-in-event.cc-and-logging.cc.patch
1717 - patches/0003-Newer-hermetic-python.patch
18- # This needs modification for each release
19- - patches/0004-update-commit-sha.patch
2018 # See https://github.com/conda-forge/ray-packages-feedstock/issues/136
2119 # Keep in sync with current or active migration of libgrpc to avoid
2220 # ABI breakage
@@ -35,7 +33,8 @@ source:
3533 - patches/0012-No-path-isolation.patch
3634
3735build :
38- number : 1
36+ number : 2
37+
3938
4039outputs :
4140 - package :
@@ -65,7 +64,10 @@ outputs:
6564 - package :
6665 name : ray-core
6766 build :
68- script : build-core
67+ script :
68+ file : build-core
69+ env :
70+ RAY_VER : ${{ version }}
6971 python :
7072 entry_points :
7173 - ray = ray.scripts.scripts:main
You can’t perform that action at this time.
0 commit comments