-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
The package doesnt include the /data needed by the app.
On OSX I get
spec-cleaner -i *.spec
ERROR: File 'excludes-bracketing.txt' not found in datadirs
Exception ignored in: <function RpmSpecCleaner.__del__ at 0x10ab28d30>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/spec_cleaner/rpmcleaner.py", line 424, in __del__
if self.fin:
AttributeError: 'RpmSpecCleaner' object has no attribute 'fin'
IMO the fix is to include the data dir into the package, and put at lower priority than distro packages, e.g.
diff --git a/spec_cleaner/fileutils.py b/spec_cleaner/fileutils.py
index 4e17cd8..d7d50a2 100644
--- a/spec_cleaner/fileutils.py
+++ b/spec_cleaner/fileutils.py
@@ -28,6 +28,7 @@ def open_datafile(name: str) -> IO[str]:
'{0}/share/spec-cleaner/{1}'.format(homedir, name),
'{0}/share/spec-cleaner/{1}'.format(sysconfig.get_path('data'), name),
'{0}/share/spec-cleaner/{1}'.format(sys.prefix, name),
+ '{0}/data/{1}'.format(os.path.dirname(os.path.realpath(__file__)), name),
)
for path in possible_paths:
Metadata
Metadata
Assignees
Labels
No labels