Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Build on Linux
id: build-linux
Expand Down Expand Up @@ -121,4 +121,4 @@ jobs:
UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }}
BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }}
FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
6 changes: 6 additions & 0 deletions recipe/build-core.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ echo %CONDA_PREFIX%
python -c "import os; print('\n'.join(os.environ['PATH'].split(';')))"
echo ----------

echo ========================================
echo Fix up the sha in python/ray/_version.py
echo ========================================
python3 %RECIPE_DIR%/fixup_sha.py python/ray/_version.py %RAY_VER%


echo ==========================================================
echo calling pip to install
echo ==========================================================
Expand Down
5 changes: 5 additions & 0 deletions recipe/build-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ echo '---------------- .bazelrc --------------------------'
cat .bazelrc
echo '----------------------------------------------------'

echo ========================================
echo Fix up the sha in python/ray/_version.py
echo ========================================
python3 ${RECIPE_DIR}/fixup_sha.py python/ray/_version.py ${RAY_VER}

cd python/
export SKIP_THIRDPARTY_INSTALL_CONDA_FORGE=1

Expand Down
21 changes: 21 additions & 0 deletions recipe/fixup_sha.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Call like python3 __file__ python/ray/_version.py 2.49.2

import json;
import os
import sys
from urllib.request import urlopen;

versionpy = sys.argv[1]
ver = sys.argv[2]

assert os.path.exists(versionpy)

content = urlopen(f'https://api.github.com/repos/ray-project/ray/git/ref/tags/ray-{ver}').read()
sha = json.loads(content)['object']['sha']
with open(versionpy, 'r') as fid:
txt = fid.read()
txt = txt.replace("{{RAY_COMMIT_SHA}}", sha)
assert f'version = "{ver}"' in txt
assert f'commit = "{sha}"' in txt
with open(versionpy, 'w') as fid:
fid.write(txt)
23 changes: 0 additions & 23 deletions recipe/patches/0004-update-commit-sha.patch

This file was deleted.

10 changes: 6 additions & 4 deletions recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ source:
- patches/0001-Disable-making-entry-scripts.patch
- patches/0002-Ignore-warnings-in-event.cc-and-logging.cc.patch
- patches/0003-Newer-hermetic-python.patch
# This needs modification for each release
- patches/0004-update-commit-sha.patch
# See https://github.com/conda-forge/ray-packages-feedstock/issues/136
# Keep in sync with current or active migration of libgrpc to avoid
# ABI breakage
Expand All @@ -35,7 +33,8 @@ source:
- patches/0012-No-path-isolation.patch

build:
number: 0
number: 2


outputs:
- package:
Expand Down Expand Up @@ -65,7 +64,10 @@ outputs:
- package:
name: ray-core
build:
script: build-core
script:
file: build-core
env:
RAY_VER: ${{ version }}
python:
entry_points:
- ray = ray.scripts.scripts:main
Expand Down
Loading