Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import ast
from pathlib import Path
from packaging.version import parse, Version
from packaging.version import parse, Version, InvalidVersion
import platform
import shutil

Expand Down Expand Up @@ -337,7 +337,12 @@ def run(self):
if FORCE_BUILD:
return super().run()

wheel_url, wheel_filename = get_wheel_url()
try:
wheel_url, wheel_filename = get_wheel_url()
except InvalidVersion:
print("Non-PEP-440 version string detected. Building from source...")
super().run()
return
print("Guessing wheel URL: ", wheel_url)
try:
urllib.request.urlretrieve(wheel_url, wheel_filename)
Expand Down