From 6e8899b6776e8f373c38f987307f44d650716738 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 3 Sep 2024 03:04:45 -0400 Subject: [PATCH] handle os upgrade, fix tweepy setup --- README | 3 +++ pdt.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README b/README index 1e403d9..b42aee9 100644 --- a/README +++ b/README @@ -29,5 +29,8 @@ Main usage: source pdt.sh, run pdt-setup one time, then usually just run pdt to do posts. The documentation for each function is within the pdt.sh file. After an update via git pull, run pdt-stup again. +If you've upgraded your OS, and have a new version of python, you may need to +rm -rf ~/.local ~/src/tweepy/venv ~/src/toot/venv, and run pdt-setup. + Patches welcome, email them to iank@fsf.org . If you aren't sure how to send a patch, see https://git-send-email.io/ diff --git a/pdt.sh b/pdt.sh index 9ac3107..d1ae6eb 100644 --- a/pdt.sh +++ b/pdt.sh @@ -395,7 +395,7 @@ pdt-toot-setup() { rm -rf ~/src/toot mkdir -p ~/src/toot - # subshell for cd + # subshell for cd & source without deactivate ( cd ~/src/toot # on t11, got myself into a situation where when doing pip install virtualenv, @@ -482,6 +482,15 @@ pdt-pip-setup() { # generally only meant to be called internally from pdt-setup pdt-twitter-setup() { + if [[ ! -e ~/src/tweepy ]]; then + mkdir -p ~/src + cd ~/src + git clone https://github.com/tweepy/tweepy.git + cd tweepy + # just a commit we happened to use and is working + git checkout f32d12dbddbd877470446657812a10a04292d0c9 + fi + # subshell so it undoes the source command. ( cd ~/src/tweepy python3 -m virtualenv -p python3 venv -- 2.25.1