aboutsummaryrefslogtreecommitdiffstats
path: root/python@zenith
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-05-06 10:17:18 +0200
committerMattias Andrée <maandree@kth.se>2024-05-06 10:17:18 +0200
commit9e61d4b3a6c16ea7e914956a571849d14c0e0baf (patch)
tree404c2545e9618a224822ea7fcf3125762d866358 /python@zenith
parent... (diff)
downloaddotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.gz
dotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.bz2
dotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.xz
Update clawsrc and make python and st exclusive to zenith
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'python@zenith')
-rw-r--r--python@zenith/Makefile23
-rw-r--r--python@zenith/bash-aliases3
-rw-r--r--python@zenith/user-profile3
3 files changed, 29 insertions, 0 deletions
diff --git a/python@zenith/Makefile b/python@zenith/Makefile
new file mode 100644
index 0000000..4a20fbe
--- /dev/null
+++ b/python@zenith/Makefile
@@ -0,0 +1,23 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.var/cache
+ test ! -d ~/.python_history
+ ln -sf .var/cache/python_history ~/.python_history
+ mkdir -p -- ~/.config/profile.d
+ test ! -d ~/.config/profile.d/python
+ ln -sf -- ~/.dotfiles/python@zenith/user-profile ~/.config/profile.d/python
+ if test "$$(python --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1)" = 2; then \
+ mkdir -p -- ~/.config/bash/aliases.d && \
+ test ! -d ~/.config/bash/aliases.d/python && \
+ ln -sf -- ~/.dotfiles/python@zenith/bash-aliases ~/.config/bash/aliases.d/python; \
+ fi
+
+uninstall:
+ +! ../check-installed python
+ -unlink -- ~/.config/profile.d/python
+ -rmdir -- ~/.config/profile.d
+ -unlink -- ~/.var/cache/python_history
+ -unlink -- ~/.python_history
+ -unlink -- ~/.config/bash/aliases.d/python
+ -rmdir -- ~/.config/bash/aliases.d
diff --git a/python@zenith/bash-aliases b/python@zenith/bash-aliases
new file mode 100644
index 0000000..90ef57b
--- /dev/null
+++ b/python@zenith/bash-aliases
@@ -0,0 +1,3 @@
+# -*- shell-script -*-
+
+alias python="python3"
diff --git a/python@zenith/user-profile b/python@zenith/user-profile
new file mode 100644
index 0000000..8c9f982
--- /dev/null
+++ b/python@zenith/user-profile
@@ -0,0 +1,3 @@
+# -*- shell-script -*-
+
+export PYTHON_EGG_CACHE="${XDG_CACHE_HOME}/python-eggs"