Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldoussoren committed Apr 21, 2022
1 parent a419af9 commit 7d5cac7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
8 changes: 0 additions & 8 deletions py2app/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,3 @@ def not_system_filter(module):
Return False if the module is located in a system directory
"""
return not in_system_path(module.filename)


def bundle_or_dylib_filter(module):
"""
Return False if the module does not have a filetype attribute
corresponding to a Mach-O bundle or dylib
"""
return getattr(module, "filetype", None) in ("bundle", "dylib")
7 changes: 7 additions & 0 deletions py2app/progress.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
Basic progress reporting and logging
The interface is a work in progress, and might
be dropped later in favour of direct usage of
rich.progress
"""
import rich.progress


Expand Down
13 changes: 0 additions & 13 deletions py2app_tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,3 @@ def test_not_system_filter(self):
self.assertTrue(filters.not_system_filter(Node("/tmp/foo")))
finally:
filters.in_system_path = cur_func

def test_bundle_or_dylib_filter(self):
node = Node("dummy.dylib")
self.assertFalse(filters.bundle_or_dylib_filter(node))

node.filetype = "elf"
self.assertFalse(filters.bundle_or_dylib_filter(node))

node.filetype = "bundle"
self.assertTrue(filters.bundle_or_dylib_filter(node))

node.filetype = "dylib"
self.assertTrue(filters.bundle_or_dylib_filter(node))

0 comments on commit 7d5cac7

Please sign in to comment.