arsenetar / dupeguru

Find duplicate files
https://dupeguru.voltaicideas.net
GNU General Public License v3.0
5.37k stars 415 forks source link

Picture Mode: workflow improvements #441

Open bernd-wechner opened 7 years ago

bernd-wechner commented 7 years ago

The idea of dupeGuru rocks. Yet it falls a little short from the ideal of a really awesome tool for killing duplicate photos. I can see a great side by side pair of previews of images with View->Details. Check,

Now I want to use that Detail view ideally to delete the undesired of the two. With a single click somehow, and then see the view view advance to the next pair in the list.

This would turn dupeGuru into an awesome photo processor, with which I could walk through my camera uploads and quickly trash my way down to the best photos I want to keep.

I want this so bad I'd consider forking, implementing and posting a PR, but there's no chance I'd invest that time without some prior indication of the likelihood of mainlining such a contribution (I don't want to maintain a fork).

ghost commented 7 years ago

It's a good idea! especially for photos. Now I'm wondering why I haven't thought of it sooner. I would merge such a feature yes.

I'm willing to help you if you're stuck somewhere.

bernd-wechner commented 7 years ago

OK, I forked and cloned. Then:

$ make
git submodule init
Submodule 'hscommon' (https://github.com/hsoft/hscommon.git) registered for path 'hscommon'
Submodule 'qtlib' (https://github.com/hsoft/qtlib.git) registered for path 'qtlib'
git submodule update
Cloning into 'hscommon'...
remote: Counting objects: 2043, done.
remote: Total 2043 (delta 0), reused 0 (delta 0), pack-reused 2043
Receiving objects: 100% (2043/2043), 1.15 MiB | 247.00 KiB/s, done.
Resolving deltas: 100% (597/597), done.
Checking connectivity... done.
Submodule path 'hscommon': checked out '5497c6fec44de6767a6488f540526d70218ef0da'
Cloning into 'qtlib'...
remote: Counting objects: 1486, done.
remote: Total 1486 (delta 0), reused 0 (delta 0), pack-reused 1486
Receiving objects: 100% (1486/1486), 497.56 KiB | 219.00 KiB/s, done.
Resolving deltas: 100% (444/444), done.
Checking connectivity... done.
Submodule path 'qtlib': checked out 'f2dce13c3e7289948623de66c4d1277560df0cee'
Creating our virtualenv
python3 -m venv env
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/home/bernd/workspace/dupeguru/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

Makefile:75: recipe for target 'env' failed
make: *** [env] Error 1

Any help with that appreciated. I'm pretty savvy with Python, been working on a Django site for a couple of years, but am not so savvy with app development specifics (notably don't know what ensurepip is, or what's failing here).

So I did:

apt install python3-venv

and then:

$ make
./env/bin/python hscommon/build_ext.py core/pe/modules/block.c core/pe/modules/common.c _block
Traceback (most recent call last):
  File "hscommon/build_ext.py", line 9, in <module>
    from setuptools import setup, Extension
ImportError: No module named 'setuptools'
Makefile:95: recipe for target 'core/pe/_block.*.so' failed
make: *** [core/pe/_block.*.so] Error 1

So:

$ sudo -H pip3 install setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages

So I tried "import setuptools" in both the python3 and python2 CLI and works fine. So a bit stumped and gotta run my 4 year old to school now ;-)

ghost commented 7 years ago

Hum... what is your system, Ubuntu? The problem seems pip-related (the initial failing command is on ensurepip). Maybe apt install python3-pip or something like that? After that, i'd clean the whole repo because it looks like your venv is in a broken state.

bernd-wechner commented 7 years ago

Apologies was in a rush. But here's inxi output:

System:    Kernel: 4.4.0-93-generic x86_64 (64 bit) Console: tty 7 Distro: Linux Mint 18.1 Serena
Machine:   System: ASUS product: All Series
           Mobo: ASUSTeK model: MAXIMUS VII HERO v: Rev 1.xx
           Bios: American Megatrends v: 2401 date: 02/24/2015
CPU:       Quad core Intel Core i7-4790 (-HT-MCP-) cache: 8192 KB
           clock speeds: max: 4000 MHz 1: 3623 MHz 2: 3600 MHz 3: 3602 MHz 4: 3643 MHz 5: 3606 MHz
           6: 3646 MHz 7: 3647 MHz 8: 3686 MHz
Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
           Display Server: X.org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           tty size: 102x92 Advanced Data: N/A out of X
Audio:     Card-1 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
           driver: snd_hda_intel
           Card-2 Intel 9 Series Family HD Audio Controller driver: snd_hda_intel
           Card-3 Logitech G930 driver: USB Audio
           Sound: Advanced Linux Sound Architecture v: k4.4.0-93-generic
Network:   Card: Intel Ethernet Connection (2) I218-V driver: e1000e
           IF: eno1 state: up speed: 100 Mbps duplex: full mac: 08:62:66:4a:31:5b
Drives:    HDD Total Size: 3688.8GB (78.4% used)
           ID-1: /dev/sda model: KINGSTON_SV300S3 size: 240.1GB
           ID-2: /dev/sdb model: SAMSUNG_SSD_830 size: 128.0GB
           ID-3: /dev/sdc model: WDC_WD10EACS size: 1000.2GB
           ID-4: /dev/sdd model: Maxtor_6V320F0 size: 320.1GB
           ID-5: /dev/sde model: WDC_WD20EARX size: 2000.4GB
Partition: ID-1: / size: 118G used: 33G (30%) fs: ext4 dev: /dev/sdb1
           ID-2: /home size: 294G used: 140G (50%) fs: ext4 dev: /dev/sdd1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 53.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 378 Uptime: 9 days Memory: 16103.3/32050.9MB Init: systemd runlevel: 5
           Client: Shell (bash) inxi: 2.2.35

and:

$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).

I can use virtual envs fine enough, though don't as a rule. I have one currently in place for mopidy and use the virtualenvwrapper for that.

 $ lsvirtualenv
mopidy
======
 $ workon mopidy
 $ lssitepackages
Babel-2.4.0.dist-info               mock-2.0.0.dist-info
Jinja2-2.9.6.dist-info              pip
MarkupSafe-1.0.dist-info            pip-9.0.1.dist-info
Mopidy-Local-SQLite.egg-link        pkg_resources
Mopidy.egg-link                     pkginfo
Pygments-2.2.0.dist-info            pkginfo-1.4.1.dist-info
Sphinx-1.6.2.dist-info              pluggy-0.4.0.dist-info
__pycache__                         pluggy.py
_pytest                             pluggy.pyc
alabaster                           py
alabaster-0.7.10.dist-info          py-1.4.34.dist-info
apipkg-1.4.dist-info                pycodestyle-2.3.1.dist-info
apipkg.py                           pycodestyle.py
apipkg.pyc                          pycodestyle.pyc
babel                               pyflakes
backports                           pyflakes-1.5.0.dist-info
certifi                             pygments
certifi-2017.4.17.dist-info         pytest-3.1.2.dist-info
chardet                             pytest-cov.pth
chardet-3.0.4.dist-info             pytest.py
check_manifest-0.35.dist-info       pytest.pyc
check_manifest.py                   pytest_capturelog-0.7.dist-info
check_manifest.pyc                  pytest_capturelog.py
configparser-3.5.0-py2.7-nspkg.pth  pytest_capturelog.pyc
configparser-3.5.0.dist-info        pytest_cov
configparser.py                     pytest_cov-2.5.1.dist-info
configparser.pyc                    pytest_xdist-1.17.1.dist-info
cookies-2.2.1.dist-info             requests
cookies.py                          requests-2.17.3.dist-info
cookies.pyc                         requests_toolbelt
coverage                            requests_toolbelt-0.8.0.dist-info
coverage-4.4.1.dist-info            responses-0.5.1.dist-info
docutils                            responses.py
docutils-0.13.1.dist-info           responses.pyc
easy-install.pth                    setuptools
easy_install.py                     setuptools-36.0.1.dist-info
easy_install.pyc                    snowballstemmer
enum                                snowballstemmer-1.2.1.dist-info
enum34-1.1.6.dist-info              sphinx
execnet                             sphinxcontrib
execnet-1.4.1.dist-info             sphinxcontrib_websupport-1.0.1-py3.6-nspkg.pth
flake8                              sphinxcontrib_websupport-1.0.1.dist-info
flake8-3.3.0.dist-info              test_cookies.py
flake8_import_order                 test_cookies.pyc
flake8_import_order-0.12.dist-info  tox
funcsigs                            tox-2.7.0.dist-info
funcsigs-1.0.2.dist-info            tqdm
idna                                tqdm-4.14.0.dist-info
idna-2.5.dist-info                  twine
imagesize                           twine-1.9.1.dist-info
imagesize-0.7.1.dist-info           typing-3.6.1.dist-info
invoke                              typing.py
invoke-0.18.1.dist-info             typing.pyc
jinja2                              urllib3
markupsafe                          urllib3-1.21.1.dist-info
mccabe-0.6.1.dist-info              wheel
mccabe.py                           wheel-0.29.0.dist-info
mccabe.pyc                          xdist
mock
(mopidy) $ deactivate
$ deactivate
$ lssitepackages
ERROR: no virtualenv active, or active virtualenv is missing

So everything seems in order there.

ghost commented 7 years ago

but did you try cleaning up the repo? I'm guessing that the env folder created by your first make call is broken.

bernd-wechner commented 7 years ago

Not sure what you mean by "clean up the repo" I guess I could just remove it and clone it again?

bernd-wechner commented 7 years ago

Spot on!

$ mv dupeguru/ dupeguruBROKEN
$ git clone https://github.com/bernd-wechner/dupeguru.git
Cloning into 'dupeguru'...
remote: Counting objects: 17112, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 17112 (delta 0), reused 1 (delta 0), pack-reused 17105
Receiving objects: 100% (17112/17112), 15.18 MiB | 789.00 KiB/s, done.
Resolving deltas: 100% (4352/4352), done.
Checking connectivity... done.
$ cd dupeguru
$ dupeguru $ make
git submodule init
Submodule 'hscommon' (https://github.com/hsoft/hscommon.git) registered for path 'hscommon'
Submodule 'qtlib' (https://github.com/hsoft/qtlib.git) registered for path 'qtlib'
git submodule update
Cloning into 'hscommon'...
remote: Counting objects: 2043, done.
remote: Total 2043 (delta 0), reused 0 (delta 0), pack-reused 2043
Receiving objects: 100% (2043/2043), 1.15 MiB | 221.00 KiB/s, done.
Resolving deltas: 100% (597/597), done.
Checking connectivity... done.
Submodule path 'hscommon': checked out '5497c6fec44de6767a6488f540526d70218ef0da'
Cloning into 'qtlib'...
remote: Counting objects: 1486, done.
remote: Total 1486 (delta 0), reused 0 (delta 0), pack-reused 1486
Receiving objects: 100% (1486/1486), 497.56 KiB | 217.00 KiB/s, done.
Resolving deltas: 100% (444/444), done.
Checking connectivity... done.
Submodule path 'qtlib': checked out 'f2dce13c3e7289948623de66c4d1277560df0cee'
Creating our virtualenv
python3 -m venv env
./env/bin/python -m pip install -r requirements.txt
Collecting Send2Trash>=1.3.0 (from -r requirements.txt (line 1))
  Using cached Send2Trash-1.4.1-py3-none-any.whl
Collecting sphinx>=1.2.2 (from -r requirements.txt (line 2))
  Using cached Sphinx-1.6.3-py2.py3-none-any.whl
Collecting polib>=1.0.4 (from -r requirements.txt (line 3))
  Using cached polib-1.0.8-py2.py3-none-any.whl
Collecting hsaudiotag3k>=1.1.3 (from -r requirements.txt (line 4))
Collecting Pygments>=2.0 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached Pygments-2.2.0-py2.py3-none-any.whl
Collecting sphinxcontrib-websupport (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached sphinxcontrib_websupport-1.0.1-py2.py3-none-any.whl
Collecting requests>=2.0.0 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting docutils>=0.11 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached docutils-0.14-py3-none-any.whl
Collecting Jinja2>=2.3 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting alabaster<0.8,>=0.7 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached alabaster-0.7.10-py2.py3-none-any.whl
Collecting six>=1.5 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting imagesize (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached imagesize-0.7.1-py2.py3-none-any.whl
Collecting babel!=2.0,>=1.3 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached Babel-2.5.0-py2.py3-none-any.whl
Collecting snowballstemmer>=1.1 (from sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached snowballstemmer-1.2.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./env/lib/python3.5/site-packages (from sphinx>=1.2.2->-r requirements.txt (line 2))
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.0.0->sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.0.0->sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0.0->sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests>=2.0.0->sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.3->sphinx>=1.2.2->-r requirements.txt (line 2))
Collecting pytz>=0a (from babel!=2.0,>=1.3->sphinx>=1.2.2->-r requirements.txt (line 2))
  Using cached pytz-2017.2-py2.py3-none-any.whl
Installing collected packages: Send2Trash, Pygments, sphinxcontrib-websupport, urllib3, certifi, chardet, idna, requests, docutils, MarkupSafe, Jinja2, alabaster, six, imagesize, pytz, babel, snowballstemmer, sphinx, polib, hsaudiotag3k
Successfully installed Jinja2-2.9.6 MarkupSafe-1.0 Pygments-2.2.0 Send2Trash-1.4.1 alabaster-0.7.10 babel-2.5.0 certifi-2017.7.27.1 chardet-3.0.4 docutils-0.14 hsaudiotag3k-1.1.3 idna-2.6 imagesize-0.7.1 polib-1.0.8 pytz-2017.2 requests-2.18.4 six-1.10.0 snowballstemmer-1.2.1 sphinx-1.6.3 sphinxcontrib-websupport-1.0.1 urllib3-1.22
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
python3 -m venv --upgrade --system-site-packages env
msgfmt -o locale/hy/LC_MESSAGES/ui.mo locale/hy/LC_MESSAGES/ui.po
msgfmt -o locale/hy/LC_MESSAGES/core.mo locale/hy/LC_MESSAGES/core.po
msgfmt -o locale/hy/LC_MESSAGES/columns.mo locale/hy/LC_MESSAGES/columns.po
msgfmt -o locale/ko/LC_MESSAGES/ui.mo locale/ko/LC_MESSAGES/ui.po
msgfmt -o locale/ko/LC_MESSAGES/core.mo locale/ko/LC_MESSAGES/core.po
msgfmt -o locale/ko/LC_MESSAGES/columns.mo locale/ko/LC_MESSAGES/columns.po
msgfmt -o locale/nl/LC_MESSAGES/ui.mo locale/nl/LC_MESSAGES/ui.po
msgfmt -o locale/nl/LC_MESSAGES/core.mo locale/nl/LC_MESSAGES/core.po
msgfmt -o locale/nl/LC_MESSAGES/columns.mo locale/nl/LC_MESSAGES/columns.po
msgfmt -o locale/uk/LC_MESSAGES/ui.mo locale/uk/LC_MESSAGES/ui.po
msgfmt -o locale/uk/LC_MESSAGES/core.mo locale/uk/LC_MESSAGES/core.po
msgfmt -o locale/uk/LC_MESSAGES/columns.mo locale/uk/LC_MESSAGES/columns.po
msgfmt -o locale/vi/LC_MESSAGES/ui.mo locale/vi/LC_MESSAGES/ui.po
msgfmt -o locale/vi/LC_MESSAGES/core.mo locale/vi/LC_MESSAGES/core.po
msgfmt -o locale/vi/LC_MESSAGES/columns.mo locale/vi/LC_MESSAGES/columns.po
msgfmt -o locale/de/LC_MESSAGES/ui.mo locale/de/LC_MESSAGES/ui.po
msgfmt -o locale/de/LC_MESSAGES/core.mo locale/de/LC_MESSAGES/core.po
msgfmt -o locale/de/LC_MESSAGES/columns.mo locale/de/LC_MESSAGES/columns.po
msgfmt -o locale/pt_BR/LC_MESSAGES/ui.mo locale/pt_BR/LC_MESSAGES/ui.po
msgfmt -o locale/pt_BR/LC_MESSAGES/core.mo locale/pt_BR/LC_MESSAGES/core.po
msgfmt -o locale/pt_BR/LC_MESSAGES/columns.mo locale/pt_BR/LC_MESSAGES/columns.po
msgfmt -o locale/zh_CN/LC_MESSAGES/ui.mo locale/zh_CN/LC_MESSAGES/ui.po
msgfmt -o locale/zh_CN/LC_MESSAGES/core.mo locale/zh_CN/LC_MESSAGES/core.po
msgfmt -o locale/zh_CN/LC_MESSAGES/columns.mo locale/zh_CN/LC_MESSAGES/columns.po
msgfmt -o locale/ru/LC_MESSAGES/ui.mo locale/ru/LC_MESSAGES/ui.po
msgfmt -o locale/ru/LC_MESSAGES/core.mo locale/ru/LC_MESSAGES/core.po
msgfmt -o locale/ru/LC_MESSAGES/columns.mo locale/ru/LC_MESSAGES/columns.po
msgfmt -o locale/pl_PL/LC_MESSAGES/ui.mo locale/pl_PL/LC_MESSAGES/ui.po
msgfmt -o locale/pl_PL/LC_MESSAGES/core.mo locale/pl_PL/LC_MESSAGES/core.po
msgfmt -o locale/pl_PL/LC_MESSAGES/columns.mo locale/pl_PL/LC_MESSAGES/columns.po
msgfmt -o locale/el/LC_MESSAGES/ui.mo locale/el/LC_MESSAGES/ui.po
msgfmt -o locale/el/LC_MESSAGES/core.mo locale/el/LC_MESSAGES/core.po
msgfmt -o locale/el/LC_MESSAGES/columns.mo locale/el/LC_MESSAGES/columns.po
msgfmt -o locale/es/LC_MESSAGES/ui.mo locale/es/LC_MESSAGES/ui.po
msgfmt -o locale/es/LC_MESSAGES/core.mo locale/es/LC_MESSAGES/core.po
msgfmt -o locale/es/LC_MESSAGES/columns.mo locale/es/LC_MESSAGES/columns.po
msgfmt -o locale/cs/LC_MESSAGES/ui.mo locale/cs/LC_MESSAGES/ui.po
msgfmt -o locale/cs/LC_MESSAGES/core.mo locale/cs/LC_MESSAGES/core.po
msgfmt -o locale/cs/LC_MESSAGES/columns.mo locale/cs/LC_MESSAGES/columns.po
msgfmt -o locale/fr/LC_MESSAGES/ui.mo locale/fr/LC_MESSAGES/ui.po
msgfmt -o locale/fr/LC_MESSAGES/core.mo locale/fr/LC_MESSAGES/core.po
msgfmt -o locale/fr/LC_MESSAGES/columns.mo locale/fr/LC_MESSAGES/columns.po
msgfmt -o locale/it/LC_MESSAGES/ui.mo locale/it/LC_MESSAGES/ui.po
msgfmt -o locale/it/LC_MESSAGES/core.mo locale/it/LC_MESSAGES/core.po
msgfmt -o locale/it/LC_MESSAGES/columns.mo locale/it/LC_MESSAGES/columns.po
./env/bin/python hscommon/build_ext.py core/pe/modules/block.c core/pe/modules/common.c _block
Building _block...
running build_ext
building '_block' extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/core
creating build/temp.linux-x86_64-3.5/core/pe
creating build/temp.linux-x86_64-3.5/core/pe/modules
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/bernd/workspace/dupeguru/env/include -I/usr/include/python3.5m -c core/pe/modules/block.c -o build/temp.linux-x86_64-3.5/core/pe/modules/block.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/bernd/workspace/dupeguru/env/include -I/usr/include/python3.5m -c core/pe/modules/common.c -o build/temp.linux-x86_64-3.5/core/pe/modules/common.o
creating build/lib.linux-x86_64-3.5
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/core/pe/modules/block.o build/temp.linux-x86_64-3.5/core/pe/modules/common.o -o build/lib.linux-x86_64-3.5/_block.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/_block.cpython-35m-x86_64-linux-gnu.so ->
mv _block.*.so core/pe
./env/bin/python hscommon/build_ext.py core/pe/modules/cache.c core/pe/modules/common.c _cache
Building _cache...
running build_ext
building '_cache' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/bernd/workspace/dupeguru/env/include -I/usr/include/python3.5m -c core/pe/modules/cache.c -o build/temp.linux-x86_64-3.5/core/pe/modules/cache.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/bernd/workspace/dupeguru/env/include -I/usr/include/python3.5m -c core/pe/modules/common.c -o build/temp.linux-x86_64-3.5/core/pe/modules/common.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/core/pe/modules/cache.o build/temp.linux-x86_64-3.5/core/pe/modules/common.o -o build/lib.linux-x86_64-3.5/_cache.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/_cache.cpython-35m-x86_64-linux-gnu.so ->
mv _cache.*.so core/pe
./env/bin/python hscommon/build_ext.py qt/pe/modules/block.c _block_qt
Building _block_qt...
running build_ext
building '_block_qt' extension
creating build/temp.linux-x86_64-3.5/qt
creating build/temp.linux-x86_64-3.5/qt/pe
creating build/temp.linux-x86_64-3.5/qt/pe/modules
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/bernd/workspace/dupeguru/env/include -I/usr/include/python3.5m -c qt/pe/modules/block.c -o build/temp.linux-x86_64-3.5/qt/pe/modules/block.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/qt/pe/modules/block.o -o build/lib.linux-x86_64-3.5/_block_qt.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/_block_qt.cpython-35m-x86_64-linux-gnu.so ->
mv _block_qt.*.so qt/pe
pyrcc5 qt/dg.qrc > qt/dg_rc.py
Build complete! You can run dupeGuru with 'make run'
$  make run
./env/bin/python run.py
QXcbConnection: Could not connect to display
Makefile:50: recipe for target 'run' failed
make: *** [run] Aborted
$

That make run fails is because I'm on a SSH session with no Xterm ;-).

So I VNC'd in and:

$ make run
./env/bin/python run.py
Traceback (most recent call last):
  File "run.py", line 12, in <module>
    from PyQt5.QtCore import QCoreApplication, QSettings
ImportError: No module named 'PyQt5'
Makefile:50: recipe for target 'run' failed
make: *** [run] Error 1

So am missing PyQt5.QtCore. Puzzle as:

$ dpkg --get-selections | grep -i pyqt
pyqt4-dev-tools                                 install
pyqt5-dev                                       install
pyqt5-dev-tools                                 install
python-pyqt5                                    install
python3-pyqt4                                   install
python3-pyqt5                                   install

So not sure what's missing. Can research it though ...

ghost commented 7 years ago

git clean -fxd would have worked also.

As for PyQt5, I'm puzzled as well. It should work. One possibility would be that the python3 -m venv --upgrade --system-site-packages env didn't do its job. One way to test this is to try:

$ python3
>>> import PyQt5

and then:

$ ./env/bin/python
>>> import PyQt5

If the first works but not the second, it's because the --system-site-packages flag wasn't properly set up for the venv. I wouldn't know why though. One quick and dirty solution would be to do ./env/bin/pip install pyqt5 which should work for py35+ according to https://pypi.python.org/pypi/PyQt5/5.9

bernd-wechner commented 7 years ago

Brilliant. A mystery what's happening here alas, because it's not quite to script.

Both

$ python3
>>> import PyQt5

and

$ python3
>>> import PyQt5

worked fine and seamlessly. Yet make run did not.

So I tried:

./env/bin/pip install pyqt5

for the heck of it and:

$ ./env/bin/pip install --upgrade pyqt5
Collecting pyqt5
  Downloading PyQt5-5.9-5.9.1-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (104.6MB)
    100% |████████████████████████████████| 104.6MB 8.7kB/s 
Collecting sip<4.20,>=4.19.3 (from pyqt5)
  Downloading sip-4.19.3-cp35-cp35m-manylinux1_x86_64.whl (63kB)
    100% |████████████████████████████████| 71kB 2.1MB/s 
Installing collected packages: sip, pyqt5
  Found existing installation: sip 4.18.1
    Not uninstalling sip at /usr/local/lib/python3.5/dist-packages, outside environment /home/bernd/workspace/dupeguru/env
  Found existing installation: PyQt5 5.7
    Not uninstalling pyqt5 at /usr/local/lib/python3.5/dist-packages, outside environment /home/bernd/workspace/dupeguru/env
Successfully installed pyqt5-5.9 sip-4.19.3

and now make run works. Am rolling.

This was the minimum to enable a look later at the code and see what I learn. I quite love looking at live projects that have a GUI, tox implemented and a package build as those are all areas I'm weak in. But I'm snowed under too so we'll see. Could happen soon (while I have momentum) or fall by the wayside for a bit.

bernd-wechner commented 7 years ago

Hmmm, worth noting quickly for the record only, and as a curio, that I found something odd that I had never seen before and which explains some of the mystery above.

I tend to run with quite a few terminal windows up over a few workspaces. Now as it happens I did a:

mv dupeguru dupeguru.BROKEN

before recloning it.

Now there was one terminal window that was in the dupeguru directory. The prompt and pwd both confirmed. But evidentially (by creating a file) I noticed it was actually in the dupeguru.BROKEN directory. bash got itself a little confused with that mv.

Now, I don't know exactly which step above I did in which term window as one was on workspace 1 and the other on workspace 2, and I was flipping back and forth multitasking as I do. But I noticed it because make run worked, and then a minute later it did not!

I then noticed I was using different terms and tried again and confirmed it worked in one not the other.

So I concluded perhaps a different environment and did env > env.good in the window it worked in and env > env.bad in the other, and then diffed them, or wanted to, and only saw one of them!? Then I looked in dupeguru.BROKEN and found the other one! And confirmed the window that wrote to dupeguru.BROKEN was reporting dupeguru with pwd and in the prompt.

Some really bizarre caching issue with bash. Hmmm ... and an eye opener. Pehrpas I've never tried mving a directory that another terminal was in before ... a lesson learned,

Still while it runs now:

 $ make run
./env/bin/python run.py
QApplication: invalid style override passed, ignoring it.

I still gave this invalid style waning to diagnose some time. The GUI fired up though and works fine from what I can tell.

Sorry this has been a little tricky. A middling experience. I've cloned a lot of repos over time hoping to work on an app a bit, and the good ones, just work (mopidy for example), the lousy ones never work and I just give up (banshee for example) and a middling one has issues but I get it working ;-).