Skip to content

Commit

Permalink
Windows builds stopped working; be looser about directory name. (#1407)
Browse files Browse the repository at this point in the history
* Windows builds stopped working; be looser about directory name.

* The directory name doesn't even have a dot in Python version.
  • Loading branch information
jpivarski authored Apr 11, 2022
1 parent edfce38 commit 87cf579
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import subprocess
import sys
import glob

import setuptools
import setuptools.command.build_ext
Expand Down Expand Up @@ -206,18 +207,15 @@ def run(self):

if platform.system() == "Windows":
print("--- copying libraries -----------------------------------------")
dlldir = os.path.join(
dlldir = glob.glob(
os.path.join(
"build",
"temp.%s-%d.%d"
% (
get_platform(),
sys.version_info[0],
sys.version_info[1],
),
),
"Release",
f"temp.*-{sys.version_info[0]}*{sys.version_info[1]}",
"Release",
)
)
assert len(dlldir) == 1, f"glob returned {dlldir!r}"
dlldir = dlldir[0]
found = False
for x in os.listdir(dlldir):
if x.endswith(".lib") or x.endswith(".exp") or x.endswith(".dll"):
Expand Down

0 comments on commit 87cf579

Please sign in to comment.