Skip to content

Commit

Permalink
Resolve #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
huntzhan committed Jun 9, 2022
1 parent 91638cb commit 535661c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions pywhlobf/post.py
@@ -1,11 +1,9 @@
import sys
from itertools import chain
import pathlib
from distutils.util import get_platform

from wheel.bdist_wheel import (
get_abi_tag,
get_platform as get_platform_tag,
)
from wheel.bdist_wheel import get_abi_tag
from wheel.wheelfile import WheelFile


Expand Down Expand Up @@ -54,7 +52,12 @@ def generate_whl_name(
):
python_tag = 'cp' + ''.join(map(str, sys.version_info[:2]))
abi_tag = abi_tag or get_abi_tag()
platform_tag = platform_tag or get_platform_tag(input_folder)
platform_tag = platform_tag or get_platform()

if platform_tag.startswith('linux-'):
# Patch the invalid platform tag.
platform_tag_suffix = platform_tag[len('linux-'):]
platform_tag = 'linux_' + platform_tag_suffix

components = [distribution, version]
if build_tag:
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Expand Up @@ -14,8 +14,8 @@ packages = find:
python_requires = >= 3.5, < 3.10
install_requires =
Cython >= 0.29.28
wheel ~= 0.37.1
fire ~= 0.4.0
wheel >= 0.37.1
fire >= 0.4.0

[options.extras_require]
cython3 =
Expand Down

0 comments on commit 535661c

Please sign in to comment.