forked from kivy/buildozer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use buildops for file_exists and file_matches
This is part of a larger refactor, to reduce the size and complexity of the Buildozer class. * Remove `file_matches()` method from the Buildozer class. * Change the singular reference to it in `android.py` to use the buildops function. * This raises the question: Will this be useful to other targets in the future, or should this be moved into the android target? Left for future refactors. * Remove the `file_exists()` method from the Buildozer class. * Change all the references to use the buildops function. * Note for consistency with the other buildop functions, buildops.file_exists() takes a single parameter rather than `*args` and doesn't join the path together. One client call needed to be changed to accommodate that. * Note that in several places, the code checks for the existence of *directories* with os.path.exists(). I did **not** change these over because: * Historically, the name as been **file**_exists(). * With the join statement removed, this function doesn't add anything to calling `os.path.exists()` or `pathlib.Path.exists()`, so enforcing it on the code seemed counter-productive. I went with for consistency with existing code. * Update mocks
- Loading branch information
Showing
6 changed files
with
25 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters