novoid / Memacs

What did I do on February 14th 2007? Visualize your (digital) life in Org-mode
GNU General Public License v3.0
1.03k stars 66 forks source link

implement sub-packages to install only selected module dependencies #114

Open nbehrnd opened 2 years ago

nbehrnd commented 2 years ago

The issue either suggests to reformulate the project's main README.org, or to revise how individual modules of Memacs are installed.

The aim was to install Memacs with the photos module in an instance of Linux Debian 12/bookworm, branch testing. Before this, there was no permanent installation of Memacs at all (a virtual environment for Python earlier used for testing already was removed). At this point, there was no intent to use any other optional module of Memacs. This is why I thought

python3 -m pip install memacs photos

would fit well.

Contrasting to anticipation, the log reports the installation of multiple modules of Memacs:

norwid@carnot2:~$ python3 -m pip install memacs photos
Defaulting to user installation because normal site-packages is not writeable
Collecting memacs
  Using cached memacs-2021.1.28.1-py3-none-any.whl (110 kB)
Collecting photos
  Using cached photos-0.0.5-py3-none-any.whl (6.5 kB)
Collecting orgformat
  Using cached orgformat-2019.12.29.1-py3-none-any.whl (22 kB)
Collecting emoji
  Using cached emoji-1.7.0.tar.gz (175 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: click>=7.0 in /usr/lib/python3/dist-packages (from photos) (8.0.3)
Requirement already satisfied: colorama>=0.4.0 in /usr/lib/python3/dist-packages (from photos) (0.4.5)
Collecting filesystemlib
  Using cached filesystemlib-0.1.0-py3-none-any.whl (6.5 kB)
Collecting ExifRead
  Using cached ExifRead-3.0.0-py3-none-any.whl (40 kB)
Collecting pyheif
  Using cached pyheif-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.8 MB)
Requirement already satisfied: cffi>=1.0.0 in /usr/lib/python3/dist-packages (from pyheif->photos) (1.15.0)
Building wheels for collected packages: emoji
  Building wheel for emoji (setup.py) ... done
  Created wheel for emoji: filename=emoji-1.7.0-py3-none-any.whl size=171046 sha256=3e7601d9e0302683ad709f4e5286161b9cecaaaab9b8e8abf98cf9036a930710
  Stored in directory: /home/norwid/.cache/pip/wheels/31/8a/8c/315c9e5d7773f74b33d5ed33f075b49c6eaeb7cedbb86e2cf8
Successfully built emoji
Installing collected packages: orgformat, ExifRead, emoji, pyheif, memacs, filesystemlib, photos
  WARNING: The scripts memacs_arbtt, memacs_battery, memacs_chrome, memacs_csv, memacs_example, memacs_filenametimestamps, memacs_firefox, memacs_git, memacs_gpx, memacs_ical, memacs_imap, memacs_kodi, memacs_lastfm, memacs_mumail, memacs_phonecalls, memacs_phonecalls_superbackup, memacs_photos, memacs_rss, memacs_simplephonelogs, memacs_sms, memacs_sms_superbackup, memacs_svn, memacs_twitter and memacs_whatsapp are installed in '/home/norwid/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script photos is installed in '/home/norwid/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed ExifRead-3.0.0 emoji-1.7.0 filesystemlib-0.1.0 memacs-2021.1.28.1 orgformat-2019.12.29.1 photos-0.0.5 pyheif-0.7.0
norwid@carnot2:~$ 
norwid@carnot2:~$ PATH=/home/norwid/.local/bin:$PATH  # addition for the PATH variable

for a total of

norwid@carnot2:~/.local/bin$ ls ~/.local/bin/memacs_* | wc -l
24

though for now I would like to get familiar with a sub set of them.

novoid commented 2 years ago

This would be a helpful improvement, indeed. Unfortunately, I don't know how to do that.

Maybe somebody wants to contribute here? I've set the "help wanted" label.

nbehrnd commented 2 years ago

@novoid By «git archeology» / reading the git log by June 2, 2020, I speculate Andrea Ghensi might help here. Because the symbolization / profile picture does not appear among the self declared «watchers» of this very project, I send one ping («one ping only ... ») to inform about the obstacle ahead.

nbehrnd commented 2 years ago

@sanzoghenzo The selection of one Memacs module (e.g., about photos) currently yields the installation of all Memacs modules. Because the functionality was implemented by you, may you look on this again; perhaps it is just a detail you spot immediately to improve Memacs once again. Thank you!

sanzoghenzo commented 2 years ago

Hi @nbehrnd , It's been a long time since I last used memacs, but this is what I got by a quick look:

so, to fix this specific case:

You will still see all the commands, but at least you only install the photos depencencies

novoid commented 2 years ago

I'll close this issue here as it seems to be a duplicate of #74

Feel free to continue discussing there.

novoid commented 2 years ago

After realizing the suggested change (see above and https://github.com/novoid/Memacs/issues/74#issuecomment-1186548950) I reopen this issue because it actually introduces an in-between step between the current situation (Memacs as one single big blob) and Memacs split up into separate repositories.

By being able to install the dependencies of selected modules, users are able to keep their setup footprint small in comparison to "setup every dependency at once".