Skip to content

Commit

Permalink
fix copying libraries to source directory on build
Browse files Browse the repository at this point in the history
os.walk is not a drop-in for the originally used os.path.walk.
  • Loading branch information
cjmayo committed Feb 1, 2018
1 parent 97bbd71 commit 17211f6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,15 @@ def get_files(dir,ext):
if 'win' == sys.platform[:3]:
lib_targets["fract4d_stdlib.lib"] = "fract4d"

def copy_libs(dummy,dirpath,namelist):
for name in namelist:
target = lib_targets.get(name)
if target != None:
name = os.path.join(dirpath, name)
shutil.copy(name, target)

os.walk("build",copy_libs,None)
def copy_libs(root, dirlist, namelist):
for name in namelist:
target = lib_targets.get(name)
if target is not None:
shutil.copy(os.path.join(root, name), target)

for root, dirs, files in os.walk("build"):
copy_libs(root, dirs, files)

if 'win' == sys.platform[:3]:
shutil.copy("fract4d/fract4d_stdlib.pyd", "fract4d_stdlib.pyd")

0 comments on commit 17211f6

Please sign in to comment.