sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.87k stars 130 forks source link

MacPorts install option? #468

Closed ylluminate closed 2 years ago

ylluminate commented 3 years ago

Been working at purging our systems of Homebrew due to some various reasons and trouble that it causes. MacPorts has proven to be much more reliable and solid a package manager. Has anyone successfully built an rmlint MacPorts recipe as of yet or is this still something that needs to be done?

SeeSpotRun commented 3 years ago

Neither @sahib nor I are Mac users so it's going to need someone else to contribute this.

Here's the early history for Homebrew recipe: https://github.com/sahib/rmlint/issues/175

SeeSpotRun commented 3 years ago

Ok I now have access to a Mac development environment so may be able to make some progress on this...

SeeSpotRun commented 3 years ago

I have a working MacPorts recipe for rmlint command-line version, trying to get gui working now but struggling...

Are people specifically looking for gui on Mac or happy with command-line?

SeeSpotRun commented 3 years ago

... got there in the end!

Looking for testers for https://github.com/SeeSpotRun/ports/blob/main/sysutils/rmlint/Portfile

After cloning and setting up as local MacPorts repo,

$ sudo port install rmlint

... should install command-line version.

For gui:

$ sudo port install rmlint +gui
$ # (may need to log out and back in again to enable xorg-server)
$ export PYTHONPATH="/opt/local/lib/python3.9/site-packages:$PYTHONPATH"
$ shredder
ylluminarious commented 3 years ago

@SeeSpotRun Thanks for the Portfile! The CLI version appears to be working perfectly.

The GUI version, however, threw the following error when I tried to run it:

Traceback (most recent call last):
  File "/opt/local/bin/shredder", line 4, in <module>
    import shredder
ModuleNotFoundError: No module named 'shredder'

Does this have something to do with the following statement which is printed after it installs?:

--->  Some of the ports you installed have notes:
  xinit has the following notes:
    To use MacPorts' X11 as the default server, install xorg-server, log out, and log back in.

CC @ylluminate

SeeSpotRun commented 3 years ago

Does this have something to do with the following statement which is printed after it installs?

No, it's probably just a PYTHONPATH issue. I've done a fix for this but had forgotten to push back up to repo. Meanwhile this should work:

$ export PYTHONPATH=$"/opt/local/lib/python3.9/site-packages:$PYTHONPATH"
$ shredder

Edit: have updated Portfile , should 'just work' now

ylluminarious commented 3 years ago

@SeeSpotRun Thanks so much! Your updates appear to be working perfectly. Now I can use both the GUI and CLI versions flawlessly. You should probably make a PR to macports-ports and I'm sure they'll accept it quite readily.

Thanks again!

Edit: to clarify, I didn't even have to update my PYTHONPATH, I just used the updated Portfile and it worked fine.

SeeSpotRun commented 3 years ago

Cool, will wait until next rmlint release (planned for June) then PR the portfile.

ylluminate commented 2 years ago

Thank you by the way!