gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 161 forks source link

packaging issue #493

Closed rui-nar closed 3 weeks ago

rui-nar commented 4 weeks ago

Hey @gilesknap I tried to install the latest version using pip install pointing to the Github repo and here's the result (please note all the UNKNOW at the end. Any ideas on what's happening ? Cheers

(GPhotos-Sync) abc@linuxserver-code-server:/public/pythondev/GPhotos-Sync$ python3 -m pip install -t ./gphotos-sync git+https://github.com/gilesknap/gphotos-sync.git
Collecting git+https://github.com/gilesknap/gphotos-sync.git
  Cloning https://github.com/gilesknap/gphotos-sync.git to /tmp/pip-req-build-hfi22o9w
  Running command git clone --filter=blob:none --quiet https://github.com/gilesknap/gphotos-sync.git /tmp/pip-req-build-hfi22o9w
  Resolved https://github.com/gilesknap/gphotos-sync.git to commit 2c70af93aaadc815bee4ab1cf5dc848ebf4f4dd3
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-3.2.4-py3-none-any.whl size=5419 sha256=9a25a9410bf4a62b930b8bc2fd20598abe33e16c211f8b5acc4c3517bf4e336f
  Stored in directory: /tmp/pip-ephem-wheel-cache-jgq65f3d/wheels/3b/80/06/e8a3c309668ded95b72644e9ef6db2464e776ecc1a2d386c12
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-3.2.4

(GPhotos-Sync) abc@linuxserver-code-server:/public/pythondev/GPhotos-Sync$ ls gphotos-sync/
UNKNOWN-3.2.4.dist-info

(GPhotos-Sync) abc@linuxserver-code-server:/public/pythondev/GPhotos-Sync$ gphotos-sync --version
bash: gphotos-sync: command not found
sebrem commented 4 weeks ago

I can't reproduce it, re-using my venv

#!/bin/bash
source /home/sebrem/workspace/gphotos-sync/bin/activate
python3 -m pip install git+https://github.com/gilesknap/gphotos-sync.git
/home/sebrem/workspace/gphotos-sync/bin/gphotos-sync "${@}" 
deactivate

yields

~$ gphotos-sync.sh /home/sebrem/Google\ Photos\ Backup/ --archive --album-date-by-first-photo                                
Collecting git+https://github.com/gilesknap/gphotos-sync.git
  Cloning https://github.com/gilesknap/gphotos-sync.git to /tmp/pip-req-build-jgbmk_1c
  Running command git clone --filter=blob:none --quiet https://github.com/gilesknap/gphotos-sync.git /tmp/pip-req-build-jgbmk_1c
  Resolved https://github.com/gilesknap/gphotos-sync.git to commit 2c70af93aaadc815bee4ab1cf5dc848ebf4f4dd3
  Installing build dependencies ... done                     
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: attrs in ./workspace/gphotos-sync/lib/python3.11/site-packages (from gphotos-sync==3.2.4) (23.2.0)
[...]Requirement already satisfied: certifi>=2017.4.17 in ./workspace/gphotos-sync/lib/python3.11/site-packages (from requests>=2.0.0->requests-oauthlib>=0.7.0->google-auth-oauthlib->gphotos-sync==3.2.4) (2024.2.2)
06-06 20:16:57 WARNING  gphotos-sync 3.2.4 2024-06-06 20:16:57.008029  
06-06 20:16:57 WARNING  Indexing Google Photos Files ... 
06-06 20:16:58 WARNING  indexed 1 items 
[...]

It's the same commit hash.

rui-nar commented 4 weeks ago

I started from a completely black folder and venv. Did you do the same or did you already have something set-up and are simply upgrading ?

sebrem commented 4 weeks ago

I'm re-using my venv normally, but it also works for me in a clean setup:

sebrem@amygdala:~$ mkdir foo/
sebrem@amygdala:~$ python3 -m venv foo/                                                                                                                                                                                                                                                 
sebrem@amygdala:~$ source /home/sebrem/foo/bin/activate                                                                                     
(foo) sebrem@amygdala:~$ python3 -m pip install git+https://github.com/gilesknap/gphotos-sync.git
Collecting git+https://github.com/gilesknap/gphotos-sync.git                                                                                
  Cloning https://github.com/gilesknap/gphotos-sync.git to /tmp/pip-req-build-vz7qv5gc
  Running command git clone --filter=blob:none --quiet https://github.com/gilesknap/gphotos-sync.git /tmp/pip-req-build-vz7qv5gc
  Resolved https://github.com/gilesknap/gphotos-sync.git to commit 2c70af93aaadc815bee4ab1cf5dc848ebf4f4dd3
  Installing build dependencies ... done                                                                                                    
  Getting requirements to build wheel ... done                 
  Preparing metadata (pyproject.toml) ... done                                                                                              
 [...]
 Building wheels for collected packages: gphotos-sync
  Building wheel for gphotos-sync (pyproject.toml) ... done
  Created wheel for gphotos-sync: filename=gphotos_sync-3.2.4-py3-none-any.whl size=61831 sha256=7e836ff55270b10c6c907ded868194a86b1bc1043fdec5ba1e30c6b5f8525385
  Stored in directory: /tmp/pip-ephem-wheel-cache-niogjdvs/wheels/23/fa/48/683258e54e003061e4f5942ca050131927f33f45ccf4b9b94a
Successfully built gphotos-sync
Installing collected packages: appdirs, urllib3, pyyaml, pyasn1, psutil, plum-py, oauthlib, idna, charset-normalizer, certifi, cachetools, attrs, rsa, requests, pyasn1-modules, exif, requests-oauthlib, google-auth, google-auth-oauthlib, gphotos-sync
Successfully installed appdirs-1.4.4 attrs-23.2.0 cachetools-5.3.3 certifi-2024.6.2 charset-normalizer-3.3.2 exif-1.6.0 google-auth-2.29.0 google-auth-oauthlib-1.2.0 gphotos-sync-3.2.4 idna-3.7 oauthlib-3.2.2 plum-py-0.8.7 psutil-5.9.8 pyasn1-0.6.0 pyasn1-modules-0.4.0 pyyaml-6.0
.1 requests-2.32.3 requests-oauthlib-2.0.0 rsa-4.9 urllib3-2.2.1
(foo) sebrem@amygdala:~$ foo/bin/gphotos-sync bar
06-06 22:07:03 WARNING  gphotos-sync 3.2.4 2024-06-06 22:07:03.797749  
Please visit this URL to authorize this application: [...]
06-06 22:07:20 WARNING  Indexing Google Photos Files ... 
sebrem commented 4 weeks ago

My versions (Debian unstable):

(gphotos-sync) sebrem@amygdala:~$ python --version
Python 3.11.9
(gphotos-sync) sebrem@amygdala:~$ pip --version
pip 24.0 from /home/sebrem/workspace/gphotos-sync/lib/python3.11/site-packages/pip (python 3.11)
rui-nar commented 3 weeks ago

Appreciate your help @sebrem .

I just retried from a clean folder repeating the same commands and now it works ... I honestly can't explain it. Anyways, thanks for your time. 👍