Skip to content

Commit

Permalink
Handle setup.py without version line
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroPsota committed Mar 3, 2025
1 parent bf8459a commit 35caeb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ jobs:
fi
VERSION_SUFFIX=+${HASH}pt${{ matrix.torch-version }}${{ matrix.compute-platform }}
sed -i $I_ARG "s/\( version=\)\(.*\)\(\,$\)/\1\2 + \"$VERSION_SUFFIX\"\3/" setup.py
sed -i $I_ARG "s/\( version=\)\(.*\)\(\,$\)/\1\2 + \"$VERSION_SUFFIX\"\3/w /tmp/changes.txt" setup.py
if [ ! -s "/tmp/changes.txt" ]; then
sed -i $I_ARG "s/\( name=.*\,$\)/\1\n version=\"0.0.1\" + \"$VERSION_SUFFIX\",/" setup.py
fi
shell: bash

- name: Checkout
Expand Down

0 comments on commit 35caeb2

Please sign in to comment.