Skip to content

Commit

Permalink
respect scripts path inside bin/Scripts dir
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgaz12 committed Jun 8, 2023
1 parent ef12b93 commit 23f95e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conda_build/noarch_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def rewrite_script(fn, prefix):

# Rewrite the file to the python-scripts directory
dst_dir = join(prefix, "python-scripts")
_force_dir(dst_dir)
dst = join(dst_dir, fn)
_force_dir(dst)
with open(dst, "w") as fo:
fo.write(data)
os.chmod(dst, src_mode)
Expand Down Expand Up @@ -80,7 +80,7 @@ def handle_file(f, d, prefix):

# Treat scripts specially with the logic from above
elif f.startswith(("bin/", "Scripts")):
fn = basename(path)
fn = os.path.join(*f.split(os.sep)[1:])
fn = rewrite_script(fn, prefix)
d["python-scripts"].append(fn)

Expand Down

0 comments on commit 23f95e3

Please sign in to comment.