feat: add install scripts, packaging and an example plugin

install.sh places the package in a version independent directory under
XDG_DATA_HOME instead of site-packages, which would be orphaned the day
the distribution moves to a new Python. It verifies the package imports
before reporting success, and warns when the pre-split extension is still
installed alongside it.

pyproject.toml makes pip install --user an equally valid route; the
bootstrap in each plugin finds the package either way.

examples/nemoRepoLastCommit.py is a complete working plugin in sixty
lines, which is the point of the split.
This commit is contained in:
dualfroz committed 2026-08-05 20:06:41 +02:00
1 parent 4ae3a496af
commit 0cd7a24adb
4 files changed
+201

No files matched your search

Executable
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Removes the installed nemoRepoCore library. The checkout and the user's
# config file are left alone.
set -euo pipefail
dataHome="${XDG_DATA_HOME:-$HOME/.local/share}"
installDir="$dataHome/nemo-repo-core"
extensionsDir="$dataHome/nemo-python/extensions"
if [ -e "$installDir/nemoRepoCore" ]; then
rm -rf "$installDir/nemoRepoCore"
echo "Removed $installDir/nemoRepoCore"
else
echo "Nothing installed at $installDir/nemoRepoCore"
fi
rmdir "$installDir" 2>/dev/null || true
remaining="$(find "$extensionsDir" -maxdepth 1 -name 'nemoRepo*.py' -o -maxdepth 1 -name 'nemoFolderTools.py' 2>/dev/null || true)"
if [ -n "$remaining" ]; then
echo
echo "WARNING: these plugins still expect the core and will now fail to load:"
echo "$remaining"
echo "Uninstall them too, then restart Nemo with: nemo -q"
fi