Skip to content

Commit

Permalink
Fix glob_paths to correctly include .kv files in package
Browse files Browse the repository at this point in the history
- Modified glob_paths function to properly identify files with given extensions
- Now correctly traverses subdirectories and returns relative file paths
- Fixes issue where .kv files were missing from pip installations
- Also affects .pot and .po files, ensuring all necessary files are included
  • Loading branch information
koala-sloth committed Aug 30, 2024
1 parent 5ff9d0d commit 7aad1e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions kivymd/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
release = False
__version__ = "2.0.1.dev0"
__hash__ = "f7bde69707ac708a758a02d89f14997ee468d1ee"
__short_hash__ = "f7bde69"
__date__ = "2024-02-27"
__hash__ = "5ff9d0de78260383fae0737716879781257155a8"
__short_hash__ = "5ff9d0d"
__date__ = "2024-08-30"
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ def glob_paths(pattern):
for root, dirs, files in os.walk(src_path):
for file in files:
if file.endswith(pattern):
filepath = os.path.join(str(Path(*Path(root).parts[1:])), file)
filepath = os.path.join(root, file)
rel_path = os.path.relpath(filepath, src_path)

try:
out_files.append(filepath.split(f"kivymd{os.sep}")[1])
except IndexError:
out_files.append(filepath)
out_files.append(rel_path)
except ValueError:
# This might happen if the file is not within src_path
pass

return out_files


if __name__ == "__main__":
# Static strings are in setup.cfg
update_version_info()
Expand Down

0 comments on commit 7aad1e6

Please sign in to comment.