Find platform tag used in wheel filename.
(self)
| 922 | return 'none' |
| 923 | |
| 924 | def tag_platform(self): |
| 925 | ''' |
| 926 | Find platform tag used in wheel filename. |
| 927 | ''' |
| 928 | ret = self.tag_platform_ |
| 929 | log0(f'From self.tag_platform_: {ret=}.') |
| 930 | |
| 931 | if not ret: |
| 932 | # Prefer this to PEP-425. Appears to be undocumented, |
| 933 | # but set in manylinux docker images and appears |
| 934 | # to be used by cibuildwheel and auditwheel, e.g. |
| 935 | # https://github.com/rapidsai/shared-action-workflows/issues/80 |
| 936 | ret = os.environ.get( 'AUDITWHEEL_PLAT') |
| 937 | log0(f'From AUDITWHEEL_PLAT: {ret=}.') |
| 938 | |
| 939 | if not ret: |
| 940 | # Notes: |
| 941 | # |
| 942 | # PEP-425. On Linux gives `linux_x86_64` which is rejected by |
| 943 | # pypi.org. |
| 944 | # |
| 945 | # On local MacOS/arm64 mac-mini have seen sysconfig.get_platform() |
| 946 | # unhelpfully return `macosx-10.9-universal2` if `python3` is the |
| 947 | # system Python /usr/bin/python3; this happens if we source `. |
| 948 | # /etc/profile`. |
| 949 | # |
| 950 | ret = sysconfig.get_platform() |
| 951 | ret = ret.replace('-', '_').replace('.', '_').lower() |
| 952 | log0(f'From sysconfig.get_platform(): {ret=}.') |
| 953 | |
| 954 | ret = _macos_fixup_platform_tag(ret) |
| 955 | |
| 956 | log0( f'tag_platform(): returning {ret=}.') |
| 957 | assert '-' not in ret |
| 958 | return ret |
| 959 | |
| 960 | def wheel_name(self): |
| 961 | ret = f'{_normalise2(self.name)}-{self.version}-{self.tag_python()}-{self.tag_abi()}-{self.tag_platform()}.whl' |
no test coverage detected