brenthuisman / par2deep

Produce, verify and repair par2 files recursively.
GNU Lesser General Public License v3.0
93 stars 8 forks source link

option to compile without GUI #14

Closed seanmikhaels closed 4 years ago

seanmikhaels commented 4 years ago

is there an option to compile/setup without the QT gui? i am using this on a raspberry pi headless over ssh and to download all of the libraries takes a a lot of space and time to compile and i have no plans to use gui version.

brenthuisman commented 4 years ago

Good question. I'm not aware of having conditional dependencies on PyPI, which could solve this issue. I use KDE Neon which includes Qt already, so first thing I do as well is remove pyqt5. So that's something you can do right now. Alternatively, download the repo, edit setup.py and remove pyqt5 and install from there.

If there's a way do this more elegantly, let me know!

seanmikhaels notifications@github.com schreef op 3 juli 2020 20:41:54 CEST:

is there an option to compile/setup without the QT gui? i am using this on a raspberry pi headless over ssh and to download all of the libraries takes a a lot of space and time to compile and i have no plans to use gui version.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/brenthuisman/par2deep/issues/14

seanmikhaels commented 4 years ago

Good question. I'm not aware of having conditional dependencies on PyPI, which could solve this issue. I use KDE Neon which includes Qt already, so first thing I do as well is remove pyqt5. So that's something you can do right now. Alternatively, download the repo, edit setup.py and remove pyqt5 and install from there. If there's a way do this more elegantly, let me know! seanmikhaels notifications@github.com schreef op 3 juli 2020 20:41:54 CEST: is there an option to compile/setup without the QT gui? i am using this on a raspberry pi headless over ssh and to download all of the libraries takes a a lot of space and time to compile and i have no plans to use gui version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: #14

Thanks for the reply. Also i finally finished compiling on my RPI, but doesn't seem to have a python-cli in any of the folders. did i miss something?

brenthuisman commented 4 years ago

If you install the package, a par2deep-cli should be available. Can you confirm?

seanmikhaels commented 4 years ago

here's the directory after running pip3 install par2deep --user

root@DietPi:~/par2deep# python3 par2deep-cli python3: can't open file 'par2deep-cli': [Errno 2] No such file or directory

root@DietPi:~/par2deep# python3 par2deep qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display.

Which is expected as this is running over SSH

As tired doing a git clone and using setup script results show in the directory no par2deep-cli in any of the folders

root@DietPi:~/par2deep# ls build LICENSE par2deep.egg-info README.md setup.py dist par2deep par2deep.ico setup_cx.py root@DietPi:~/par2deep#

brenthuisman commented 4 years ago

Hmm, that is strange. It's clearly listed in the entrypoints in setup.py, and here par2deep-cli is present.

If you don't have X, the Qt (=default) interface indeed won't start and the program crash. I just pushed a new commit that starts the cli instead (if no X found). You can try this, or start cli.py yourself.

seanmikhaels commented 4 years ago

Hmm, that is strange. It's clearly listed in the entrypoints in setup.py, and here par2deep-cli is present.

If you don't have X, the Qt (=default) interface indeed won't start and the program crash. I just pushed a new commit that starts the cli instead (if no X found). You can try this, or start cli.py yourself.

Thanks for the quick reply and fix, i did a git pull and ran the setup script again. looks like now running into another issue , i tried to edit the main file with import os that seemed to get a bit further might be my environment.

root@DietPi:~/par2deep# python3 par2deep
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "par2deep/__main__.py", line 4, in <module>
    if 'DISPLAY' in os.environ:
NameError: name 'os' is not defined
root@DietPi:~/par2deep# 
brenthuisman commented 4 years ago

Forgot imports! Should work now.

seanmikhaels commented 4 years ago

Forgot imports! Should work now.

thanks again! now getting this sorry to be a pain!

root@DietPi:~/par2deep# python3 par2deep
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "par2deep/__main__.py", line 7, in <module>
    cli.main()
  File "par2deep/cli.py", line 34, in main
    print("Using",p2d.par_cmd,"...")
AttributeError: 'par2deep' object has no attribute 'par_cmd'
brenthuisman commented 4 years ago

Ah, I see I haven't tested the cli in a while. Should be fixed.

brenthuisman commented 4 years ago

Assume the fix worked for @seanmikhaels