Rapid Photo Downloader ready for gentoo

I haven’t seen a flatpak of RPD either, and I’ve been looking. Its on my list of things to try, and I enquired about it in the flatpak IRC a while ago and got some advice.

The nice thing I’ve found about flatpak is that the community is helpful, so if I can pull something together, there is a strong possibility to get help with the final bits.

I think you have identified something important there, because almost always, something goes wrong and you cannot fix it yourself. The snap community is also helpful and engaged, but the point-person for the bug I encountered with snap wanted to me to fix it, and I just don’t have time these days to be contributing to other projects.

Dear @damonlynch

thank you very much for your comprehensive explanation.

Typically gentoo is quit up to date and compile everything acc to loacal machine setting locally. It should be a perfect harbour for RPD :slight_smile:

I wish I could promise to be a good ebuild maintainer, unfortunately I know, I cannot (tooooooo many other things…)

For the time being I’m happy, that also my PC after laptop installed 0.9.17 nicely…

Sincerely
Axel

@damonlynch
how is your dissertation going on?

gentoo has changed to python 3.7 as its default. I guess due to this RPD does not work anymore on my laptop (PC yet to be tested).

So I downloaded the install.py again and started with: python3.7 install(1).py

and I got:
Detected Linux distribution Gentoo 0.0
These Python3 packages will be upgraded for your user (i.e. not system-wide): pip, setuptools, wheel
Der folgende Befehl wird ausgeführt:

/usr/bin/python3.7 -m pip install --user --upgrade pip setuptools wheel --disable-pip-version-check


Collecting pip
  Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 2.1 MB/s 
Collecting setuptools
  Downloading setuptools-46.4.0-py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 3.8 MB/s 
Requirement already up-to-date: wheel in /usr/lib/python3.7/site-packages (0.34.2)
Installing collected packages: pip, setuptools
Successfully installed pip-20.1.1 setuptools-46.4.0
Restarting script using /usr/bin/python3.7
Downloading https://launchpad.net/rapid/pyqt/0.9.24/+download/rapid-photo-downloader-0.9.24.tar.gz (8.15 MB)
Downloading.... done!
Es wird geprüft, ob eine ältere Version mit pip installiert wurde …
This program requires:
Gdk 3.0 from gi.repositry
Please install them using your distribution's standard installation tools.

eix gdk gives me 2.4 as the latest (sorry for Geman in between; Beschreibung = description):

[I] x11-libs/gdk-pixbuf
     Verfügbare Versionen:   (2) 2.40.0
       {X gtk-doc +introspection jpeg tiff ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installierte Versionen: 2.40.0(2)(04:00:02 07.03.2020)(X introspection jpeg tiff -gtk-doc ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
     Startseite:             https://git.gnome.org/browse/gdk-pixbuf
     Beschreibung:           Image loading library for GTK+

or is this, what is needed?

* dev-ruby/ruby-gdk3
     Verfügbare Versionen:   3.3.2^t ~3.3.6^t ~3.3.7^t {test RUBY_TARGETS="ruby24 ruby25 ruby26"}
     Startseite:             https://ruby-gnome2.osdn.jp/
     Beschreibung:           Ruby GDK-3.x bindings

starting RDP as is gives me:

Traceback (most recent call last):
  File "/home/gerber/.local/bin/rapid-photo-downloader", line 5, in <module>
    from raphodo.rapid import main
ModuleNotFoundError: No module named 'raphodo'

Is there a way to get it back to work again?

Thanks in advance!

openSUSE Tumbleweed is on python >= 3.7 for a while and our rpd package works very nicely with both python versions (3.7.x and 3.8.x). maybe someone could just do an ebuild or rpd?

It’s going well thanks but I need to finish it :wink:

You need to install the gentoo package for PyGObject (which in turn requires pycairo). I have no idea what those two packages are called on gentoo, sorry.

Rapid Photo Downloader works with Python 3.4 - 3.8.

And yes, it would be great if someone did an ebuild.

both are installed already and up2date prior my todays initial post… so I’m stuck here :no_mouth:

So you are sure you have this package installed?

But at the same time if you run this from within python3, this fails?

import gi
gi.require_version('Gdk', '0.3')

If so, something is broken.

@AxelG
First I would like to know where to find the ebuild you use.

To the problem: As you know Gentoo allows you to install different versions of certain packages at the same time (-> slots). So the obvious question: After updating python to 3.7 did portage rebuild all python modules? If not simply run emerge -uDN @world to get a deep (=including all dependencies) update picking up USE-Flag changes.
Equally important is that after the python update you set the system python interpreter to python3.7. emerge won’t uninstall python-3.6 by itself. So first use eselect python to set the interpreter to python3.7, then emerge -C python:3.6

(What I don’t understand ATM: RPD is a PyQT5 application, so what do you need gdk for?)

Short answer: That’s a remnant from version 0.9.22 that should be removed.

Longer answer: Version 0.9.22 used Gdk to detect if any screens had scaling enabled very early in application startup. Using Qt to detect the scaling that early in the application lifetime would fail on a Gtk based desktop, because Gtk and KDE take different approaches to low level X settings. The code using Gdk was removed in 0.9.23 and replaced with code that probes xsettings instead. Detecting scaling very early in application start up is needed because simply enabling HighDPI scaling when it was not needed (i.e. system scaling is 1.0) resulted in severe window rendering corruption on some Gtk desktops.

Yes! 2.28.6-r55 and 3.34.0

[I] dev-python/pygobject
     Verfügbare Versionen:   
     (2)    2.28.6-r55^t
     (3)    3.32.1^t 3.34.0^t
       {+cairo examples libffi test PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8"}
     Installierte Versionen: 2.28.6-r55(2)^t(09:46:08 01.05.2020)(-examples -libffi -test PYTHON_TARGETS="python2_7") 3.34.0(3)^t(21:45:45 07.05.2020)(cairo -examples -test PYTHON_TARGETS="python2_7 python3_7 -python3_6 -python3_8")
     Startseite:             https://pygobject.readthedocs.io/
     Beschreibung:           Python bindings for GObject Introspection

unfortunately yes:

$ python3 import gi
/usr/lib/python-exec/python3.7/python3: can't open file 'import': [Errno 2] No such file or directory

If I would know, what :slight_smile: indeed I will do an “equery check…” and also I will look after above file.

…done…all relevant software installations are healthy:
# equery check dev-lang/python
* Checking dev-lang/python-2.7.18 …
4580 out of 4580 files passed

* Checking dev-lang/python-3.6.10-r2 ...
   7045 out of 7045 files passed

* Checking dev-lang/python-3.7.7-r2 ...
   7278 out of 7278 files passed

* Checking dev-lang/python-3.8.2-r2 ...
   7494 out of 7494 files passed

.

equery check pycairo
* Checking dev-python/pycairo-1.18.2 ...
   49 out of 49 files passed

.

equery check pygobject
* Checking dev-python/pygobject-2.28.6-r55 ...
   196 out of 196 files passed

* Checking dev-python/pygobject-3.34.0 ...
   231 out of 231 files passed

.

As you could see from this thread above, there is no ebuild, I use the install.py from the homepage

that is indeed in my /etc/cron.weekly (together with an eix-sync)

It would be embarrasing if I wouldn’t :slight_smile:

$ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7
  [4]   python3.8 (fallback)

Hmmm as we see from above, python 3.6 is still there, I knew that, just have difficulties to believe, this would make any difference. Lensfun still need 3.6 hence I won’t uninstall 3.6 atm…

Sorry, I meant you had to run the Python interpreter from within a terminal window and run those two commands within the interpreter, not from the shell. In any case, it’s somewhat irrelevant because you don’t need gdk in Rapid Photo Downloader >= 0.9.23. I have updated the install.py script to reflect this.

Delete the current install.py script and download and use this one (enter the command on one line):

wget https://bazaar.launchpad.net/~dlynch3/rapid/zeromq_pyqt/download/damonlynch%40gmail.com-20200522162207-hfjuwz45tn9qw207/install.sh-20160314191008-iy73j6kjbhwpk0t9-1/install.py

@damonlynch
first of all thank you very much.

I did so and installed afterwards.

Running it caused me the following:

Traceback (most recent call last):
  File "./rapid-photo-downloader", line 5, in <module>
    from raphodo.rapid import main
  File "/home/gerber/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 125, in <module>
    from raphodo.thumbnaildisplay import (
  File "/home/gerber/.local/lib/python3.7/site-packages/raphodo/thumbnaildisplay.py", line 72, in <module>
    from raphodo.rpdsql import ThumbnailRowsSQL, ThumbnailRow
  File "/home/gerber/.local/lib/python3.7/site-packages/raphodo/rpdsql.py", line 32, in <module>
    from tenacity import retry, stop_after_attempt
  File "/usr/lib/python3.7/site-packages/tenacity/__init__.py", line 352
    from tenacity.async import AsyncRetrying
                      ^
SyntaxError: invalid syntax

Should I have uninstalled something manually?

That indicates a problem in the python package tenacity in your system. I don’t know the steps that led to this problem, because I don’t use gentoo. That’s something you’ll need to figure out in order to get any program working that uses tenacity.

I checked with equery check tenacity. Seems clean … :thinking:

which version is minimum required?

@damonlynch
together we made it. THANK YOU SOOO MUCH

upgraded to tenacity-6.1.0 and that further pulled dev-python/futures-3.1.1 and virtual/python-futures-1

now it works

1 Like

sorry for being your PITA today…

on my laptop during installation I saw a weird message about upgrading PyQT5 from 4.xx.yy to 12.xx.yy.


EDIT1 after double check to my PC

mit-krb5 is needed, but not checked and missing on my laptop. So a matter of time :slight_smile:


After successfull installation RPD still don’t wanna work…

And uppon execution, file or folder not found for libgssapi_krb5.so.2

$ ./rapid-photo-downloader 
Traceback (most recent call last):
  File "./rapid-photo-downloader", line 5, in <module>
    from raphodo.rapid import main
  File "/home/gerber/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 90, in <module>
    from PyQt5.QtNetwork import QLocalSocket, QLocalServer
ImportError: libgssapi_krb5.so.2: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

usually bith machines are the same up2date… I will run another update now anyways, which on this older lenovo T450s will take some time :slight_smile:

Anything to rebuild with emerge -avt @preserved-rebuild?
revdep-rebuild might fix it, too.

I got to see :slight_smile: I was too impatient and started a @system @world (indeed with lots of opts). No worries, I will make it from here.

TNX

after installing virtual/krb5 now RPD also works on my laptop (PC has krb5 thru samba)

@damonlynch again thank you very much for your swift support and this great piece of software

(embarrassing mistake corrected :blush:)

1 Like