Fix building wheels for Python 3.7 (#1933)

This commit is contained in:
Fangjun Kuang
2025-02-27 13:02:46 +08:00
committed by GitHub
parent 337d5f7a80
commit 815ebac8f9
6 changed files with 19 additions and 5 deletions

View File

@@ -34,7 +34,11 @@ jobs:
- name: Install Python dependencies
shell: bash
run: |
pip install -U pip wheel setuptools twine==5.0.0
if [[ ${{ matrix.python-version }} == "3.7" ]]; then
pip install -U pip wheel setuptools twine
else
pip install -U pip wheel setuptools twine==5.0.0
fi
- name: Build alsa-lib
shell: bash

View File

@@ -110,6 +110,10 @@ jobs:
fi
python3 -m pip install $opts --upgrade pip
python3 -m pip install $opts wheel twine==5.0.0 setuptools
if [[ ${{ matrix.python-version }} == "cp37" ]]; then
python3 -m pip install $opts wheel twine setuptools
else
python3 -m pip install $opts wheel twine==5.0.0 setuptools
fi
twine upload ./wheelhouse/*.whl

View File

@@ -89,11 +89,16 @@ jobs:
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-wheels main
- name: Publish wheels to PyPI
shell: bash
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel twine==5.0.0 setuptools
if [[ ${{ matrix.python-version }} == "3.7" ]]; then
python3 -m pip install wheel twine setuptools
else
python3 -m pip install wheel twine==5.0.0 setuptools
fi
twine upload ./wheelhouse/*.whl

View File

@@ -43,7 +43,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '>=1.12'
go-version: '>=1.17'
- name: Display go version
shell: bash

View File

@@ -47,7 +47,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '>=1.12'
go-version: '>=1.17'
- name: Display go version
shell: bash

View File

@@ -17,6 +17,7 @@ echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
function linux() {
echo "Process linux"
git clone git@github.com:k2-fsa/sherpa-onnx-go-linux.git
rm -v ./sherpa-onnx-go-linux/*.go
cp -v ./sherpa_onnx.go ./sherpa-onnx-go-linux/