| 1 | #!/bin/bash |
| 2 | |
| 3 | # Ref.: https://github.com/pypa/manylinux |
| 4 | # |
| 5 | |
| 6 | echo Fixing wheel tag ... |
| 7 | if [ `uname -s` = Linux ]; then |
| 8 | echo ... on Linux ... |
| 9 | # $ ldd --version |
| 10 | # on ubuntu: ldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31 |
| 11 | # on archlinux: ldd (GNU libc) 2.33 |
| 12 | X=$(ldd --version | head -1 | cut -d ')' -f 2 | sed -e 's/ *//' | cut -d '.' -f 1) |
| 13 | Y=$(ldd --version | head -1 | cut -d ')' -f 2 | sed -e 's/ *//' | cut -d '.' -f 2) |
| 14 | TAG=manylinux\_$X\_$Y |
| 15 | else |
| 16 | echo ... not on Linux, bailing out ... |
| 17 | exit 0 |
| 18 | fi |
| 19 | |
| 20 | ORIG=$(ls pynauty-*-linux_*.whl) |
| 21 | NEW=$(echo $ORIG | sed -e "s/linux/$TAG/") |
| 22 | |
| 23 | echo $ORIG '-->' $NEW |
| 24 | mv -f $ORIG $NEW |
| 25 | |
| 26 | echo ... done. |