Skip to content

Commit

Permalink
Search recursively for LICENSE file - Fix Jiter package build
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Caron committed Jan 25, 2025
1 parent f0e90a9 commit bfe2644
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/pypi/build-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,15 @@ def find_package(self, name):
assert_isdir(package_dir)
return package_dir

def recursive_listdir(path):
result = []
for current_dir, subdirs, files in os.walk( path ):
for filename in files:
result.append((current_dir,filename))
return result

def find_license_files(path):
return [f"{path}/{name}" for name in os.listdir(path)
return [f"{dir}/{name}" for (dir,name) in recursive_listdir(path)
if re.search(r"^(LICEN[CS]E|COPYING|COPYRIGHT)", name.upper())]


Expand Down

0 comments on commit bfe2644

Please sign in to comment.