Skip to content

Commit

Permalink
More packaging (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug authored Nov 21, 2024
1 parent a954f02 commit 0a2a590
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/linux_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ jobs:
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
package-name: torchvision_extra_decoders
trigger-event: ${{ github.event_name }}
8 changes: 8 additions & 0 deletions packaging/post_build_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -ex

old="linux_x86_64"
new="manylinux_2_17_x86_64.manylinux2014_x86_64"
echo "Replacing ${old} with ${new} in wheel name"
mv dist/*${old}*.whl $(echo dist/*${old}*.whl | sed "s/${old}/${new}/")
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def get_and_write_version():
elif sha != "Unknown":
version += "+" + sha[:7]

version = version.replace("+cpu", "")

with open(ROOT_DIR / "torchvision_extra_decoders/version.py", "w") as f:
f.write(f"__version__ = '{version}'\n")
f.write(f"git_version = {repr(sha)}\n")
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1.0a
0.0.1a0

0 comments on commit 0a2a590

Please sign in to comment.